Commit 17386e05 authored by malenovsky's avatar malenovsky
Browse files

Merge branch 'fix-scene-name-references' into 'main'

[Item-generation] Fix scene name references

See merge request !55
parents 1551ba69 64d73499
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ def generate_ism_items(
        cfg.add_low_level_random_noise = False

    for scene_name, scene in cfg.scenes.items():
        logger.info(f"Processing {scene_name} out of {N_scenes} scenes")
        logger.info(f"Processing {scene_name} out of {N_scenes} scenes, name: {scene['name']}")

        # extract the number of audio sources
        N_sources = len(np.atleast_1d(scene["source"]))
@@ -323,7 +323,7 @@ def generate_ism_items(
            y.audio += noise

        # write individual ISM audio streams to the output file in an interleaved format
        output_filename = scene_name
        output_filename = scene["name"]
        audiofile.write(
            os.path.join(cfg.output_path, output_filename), y.audio, y.fs
        )  # !!!! TBD: replace all os.path.xxx operations with the Path object
+3 −5
Original line number Diff line number Diff line
@@ -88,9 +88,7 @@ def generate_stereo_items(

    # repeat for all source files
    for scene_name, scene in cfg.scenes.items():
        logger.info(
            f"Processing scene: {scene_name} out of {N_scenes} scenes, name: {scene_name}"
        )
        logger.info(f"Processing scene: {scene_name} out of {N_scenes} scenes, name: {scene['name']}")
        
        # extract the number of audio sources
        N_sources = len(np.atleast_1d(scene["source"]))
@@ -213,7 +211,7 @@ def generate_stereo_items(
            y.audio += noise

        # write the reverberated audio into output file
        output_filename = scene_name
        output_filename = scene["name"]
        audiofile.write(
            os.path.join(cfg.output_path, output_filename), y.audio, y.fs
        )  # !!!! TBD: replace all os.path.xxx operations with the Path object