Giter Site home page Giter Site logo

Comments (7)

jmcasebeer avatar jmcasebeer commented on May 24, 2024

Hello and thanks for the question. Can you check that the dataset was able to find the rirs? Please run the code below and let me know the result. I've pasted the output when I run it on my machine.

import zoo.aec.aec as aec
dset = aec.MSFTAECDataset_RIR(mode="test", double_talk=False, scene_change=False)
print(f"Num. RIRs Found:{len(dset.rirs)} -- First RIR {dset.rirs[0]} -- Last RIR {dset.rirs[-1]}")

# The output
# Num. RIRs Found:500 -- First RIR /mnt/data/AEC/RIRS_NOISES/simulated_rirs/mediumroom/Room040/Room040-00054.wav -- Last RIR /mnt/data/AEC/RIRS_NOISES/simulated_rirs/largeroom/Room118/Room118-00017.wav

from metaaf.

DeboBurro avatar DeboBurro commented on May 24, 2024

hi @jmcasebeer thanks for responding.

Python 3.7.16 (default, Jan 17 2023, 22:20:44) 
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zoo.aec.aec as aec
>>> dset = aec.MSFTAECDataset_RIR(mode="test", double_talk=False, scene_change=False)
>>> print(f"Num. RIRs Found:{len(dset.rirs)} -- First RIR {dset.rirs[0]} -- Last RIR {dset.rirs[-1]}")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: list index out of range
>>> dset.rirs
[]
>>> dset.__dict__
{'farend_speech_dir': '/home/username/personal/dataset/AEC-Challenge/datasets/synthetic/farend_speech', 'nearend_speech_dir': '/home/username/personal/dataset/AEC-Challenge/datasets/synthetic/nearend_speech', 'double_talk': False, 'scene_change': False, 'random_roll': False, 'max_len': 160000, 'rir_len': None, 'rirs': [], 'mode': 'test', 'offset': 0}

from metaaf.

jmcasebeer avatar jmcasebeer commented on May 24, 2024

Looks like the dataset isn't finding the RIRs. Can you check that they're unzipped and inside /home/username/personal/rirs_noises/RIRS_NOISES/?

The dataset grabs all the file names via:

import os
import glob2

RIR_DATA_DIR = "/home/username/personal/rirs_noises/RIRS_NOISES/"
rir_dir = os.path.join(RIR_DATA_DIR, "simulated_rirs/")
rirs = glob2.glob(rir_dir + "/**/*.wav")

from metaaf.

DeboBurro avatar DeboBurro commented on May 24, 2024
Python 3.7.16 (default, Jan 17 2023, 22:20:44) 
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os 
>>> import glob2
>>> RIR_DATA_DIR = "/home/username/personal/dataset/rirs_noises/RIRS_NOISES/"
>>> rir_dir = os.path.join(RIR_DATA_DIR, "simulated_rirs/")
>>> rirs = glob2.glob(rir_dir + "/**/*.wav")
>>> rirs
['/home/username/personal/dataset/rirs_noises/RIRS_NOISES/simulated_rirs/largeroom/Room030/Room030-00032.wav', '/home/username/personal/dataset/rirs_noises/RIRS_NOISES/simulated_rirs/largeroom/Room030/Room030-00088.wav', 
.
.
]

from metaaf.

jmcasebeer avatar jmcasebeer commented on May 24, 2024

Could you check that the path was correctly set in the config file? Looks like your data is setup right. You could also try manually passing in the RIR_DATA_DIR directly to the dataset.

from zoo.__config__ import RIR_DATA_DIR
print(RIR_DATA_DIR)

import zoo.aec.aec as aec
dset = aec.MSFTAECDataset_RIR(rir_dir="/home/username/personal/dataset/rirs_noises/RIRS_NOISES/", mode="test", double_talk=False, scene_change=False)
print(f"Num. RIRs Found:{len(dset.rirs)} -- First RIR {dset.rirs[0]} -- Last RIR {dset.rirs[-1]}")

from metaaf.

DeboBurro avatar DeboBurro commented on May 24, 2024
Python 3.7.16 (default, Jan 17 2023, 22:20:44) 
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zoo.aec.aec as aec
>>> from zoo.__config__ import RIR_DATA_DIR
>>> print(RIR_DATA_DIR)
/home/username/personal/dataset/rirs_noises/RIRS_NOISES/
>>> dset = aec.MSFTAECDataset_RIR(rir_dir="/home/username/personal/dataset/rirs_noises/RIRS_NOISES/", mode="test", double_talk=False, scene_change=False)
>>> print(f"Num. RIRs Found:{len(dset.rirs)} -- First RIR {dset.rirs[0]} -- Last RIR {dset.rirs[-1]}")
Num. RIRs Found:500 -- First RIR /home/username/personal/dataset/rirs_noises/RIRS_NOISES/simulated_rirs/largeroom/Room198/Room198-00030.wav -- Last RIR /home/username/personal/dataset/rirs_noises/RIRS_NOISES/simulated_rirs/smallroom/Room116/Room116-00081.wav

not sure why it's not populated properly when running the aec_eval.py but I right now manually put the rir_dir as the keyword when it instantiate the dataset object. And it works. thanks

          aec.MSFTAECDataset_RIR(
              rir_dir="/home/username/personal/dataset/rirs_noises/RIRS_NOISES/",
              mode="test",
              double_talk=False,
              scene_change=False,
              random_roll=kwargs["random_roll"],
              rir_len=eval_kwargs["true_rir_len"],
          )

from metaaf.

jmcasebeer avatar jmcasebeer commented on May 24, 2024

Glad it works. You may also want to try the 1.0.1 models -- they should be better.

from metaaf.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.