Non WAV file breaking MOTUS preparation script
Open
@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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.