Loading item_generation_scripts/__init__.py +0 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ import logging import os import pdb from itertools import repeat import yaml Loading item_generation_scripts/constants.py +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ from datetime import datetime from pathlib import Path from item_generation_scripts.utils import find_binary, get_binary_paths from item_generation_scripts.utils import get_binary_paths LOGGER_SUFFIX = ".log" LOGGER_FORMAT = ( Loading item_generation_scripts/processing/config.py +0 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import yaml from item_generation_scripts.constants import ( DEFAULT_CONFIG, DEFAULT_CONFIG_ISM2, REQUIRED_KEYS, ) Loading item_generation_scripts/processing/process_ism_items.py +5 −14 Original line number Diff line number Diff line Loading @@ -34,20 +34,11 @@ import csv import logging import os import shutil import subprocess as sp import sys from pathlib import Path import numpy as np from item_generation_scripts.audiotools import ( audio, audioarray, audiofile, binauralobjectrenderer, metadata, ) from item_generation_scripts.audiotools import audio, audiofile from item_generation_scripts.audiotools.wrappers.bs1770 import get_loudness Loading Loading @@ -82,7 +73,7 @@ def generate_ism_items( source_file = np.atleast_1d(scene["source"])[i] source_azi = np.atleast_1d(scene["azimuth"])[i] source_ele = np.atleast_1d(scene["elevation"])[i] source_type = "speech" #### !!!! TBD - support generic audio + background noise and speech in the .yml file # source_type = "speech" # !!!! TBD - support generic audio + background noise and speech in the .yml file source_delay = np.atleast_1d(scene["delay"])[i] logger.info( Loading @@ -90,7 +81,7 @@ def generate_ism_items( ) # read source file # x, fs = audiofile.read(os.path.join(input_path, source_file)) #### !!!! TBD - check the support for headerless .raw files # x, fs = audiofile.read(os.path.join(input_path, source_file)) # !!!! TBD - check the support for headerless .raw files # pdb.set_trace() audio_object = audio.fromfile("MONO", os.path.join(input_path, source_file)) Loading Loading @@ -167,7 +158,7 @@ def generate_ism_items( # additional metadata dist = np.ones( N_frames ) #### !!!! TBD - check what to do with these metadata ) # !!!! TBD - check what to do with these metadata spread = np.zeros(N_frames) gain = np.ones(N_frames) Loading Loading @@ -229,7 +220,7 @@ def generate_ism_items( output_filename = scene["name"] audiofile.write( os.path.join(output_path, output_filename), y, fs ) ### !!!! replace all os.path.xxx operations with the Path object ) # !!!! TBD: replace all os.path.xxx operations with the Path object # write individual ISM metadata to output files in .csv format for i in range(N_sources): Loading Loading
item_generation_scripts/__init__.py +0 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,6 @@ import logging import os import pdb from itertools import repeat import yaml Loading
item_generation_scripts/constants.py +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ from datetime import datetime from pathlib import Path from item_generation_scripts.utils import find_binary, get_binary_paths from item_generation_scripts.utils import get_binary_paths LOGGER_SUFFIX = ".log" LOGGER_FORMAT = ( Loading
item_generation_scripts/processing/config.py +0 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import yaml from item_generation_scripts.constants import ( DEFAULT_CONFIG, DEFAULT_CONFIG_ISM2, REQUIRED_KEYS, ) Loading
item_generation_scripts/processing/process_ism_items.py +5 −14 Original line number Diff line number Diff line Loading @@ -34,20 +34,11 @@ import csv import logging import os import shutil import subprocess as sp import sys from pathlib import Path import numpy as np from item_generation_scripts.audiotools import ( audio, audioarray, audiofile, binauralobjectrenderer, metadata, ) from item_generation_scripts.audiotools import audio, audiofile from item_generation_scripts.audiotools.wrappers.bs1770 import get_loudness Loading Loading @@ -82,7 +73,7 @@ def generate_ism_items( source_file = np.atleast_1d(scene["source"])[i] source_azi = np.atleast_1d(scene["azimuth"])[i] source_ele = np.atleast_1d(scene["elevation"])[i] source_type = "speech" #### !!!! TBD - support generic audio + background noise and speech in the .yml file # source_type = "speech" # !!!! TBD - support generic audio + background noise and speech in the .yml file source_delay = np.atleast_1d(scene["delay"])[i] logger.info( Loading @@ -90,7 +81,7 @@ def generate_ism_items( ) # read source file # x, fs = audiofile.read(os.path.join(input_path, source_file)) #### !!!! TBD - check the support for headerless .raw files # x, fs = audiofile.read(os.path.join(input_path, source_file)) # !!!! TBD - check the support for headerless .raw files # pdb.set_trace() audio_object = audio.fromfile("MONO", os.path.join(input_path, source_file)) Loading Loading @@ -167,7 +158,7 @@ def generate_ism_items( # additional metadata dist = np.ones( N_frames ) #### !!!! TBD - check what to do with these metadata ) # !!!! TBD - check what to do with these metadata spread = np.zeros(N_frames) gain = np.ones(N_frames) Loading Loading @@ -229,7 +220,7 @@ def generate_ism_items( output_filename = scene["name"] audiofile.write( os.path.join(output_path, output_filename), y, fs ) ### !!!! replace all os.path.xxx operations with the Path object ) # !!!! TBD: replace all os.path.xxx operations with the Path object # write individual ISM metadata to output files in .csv format for i in range(N_sources): Loading