marl / marl/SpatialScaper

Non WAV file breaking MOTUS preparation script

Open
#74 1 comment 0 reactions 3 assignees View on GitHub

@karinnacvijanovich is already working on this.

Since Aug 11, 2024.

bug
Dominant language
Jupyter Notebook
Stars
78
Forks
9
PR merge metrics
No merged PRs in 30d

Description

Reference Line: https://github.com/iranroman/SpatialScaper/blob/dd130d1e0f8aef0c93f5e1b73c3445f855b92e7b/scripts/prepare_rirs.py#L198

The error looks like:

  File "scripts/prepare_rirs.py", line 528, in <module>
    prepare_motus(motus_path, sofa_path)
  File "scripts/prepare_rirs.py", line 198, in prepare_motus
    source_pos = source_positions[source_pos_index] + random.uniform(
KeyError: 'rirs.zip'

From inspection, the downloaded MOTUS directory contains .zip files. I suggest either removing the unpacked zip files or checking for .wav extension before generating RIR_file_names. I.e:

        RIR_file_names = os.listdir(dataset_path)
        if fmt == "foa":
            RIR_file_names = [f for f in RIR_file_names if "sh" in f and f.endswith(".wav")]
        elif fmt == "mic":
            RIR_file_names = [f for f in RIR_file_names if "raw" in f and f.endswith(".wav")]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.