Giter Site home page Giter Site logo

AEC Data Setup Issues about metaaf HOT 9 CLOSED

adobe-research avatar adobe-research commented on June 4, 2024
AEC Data Setup Issues

from metaaf.

Comments (9)

jmcasebeer avatar jmcasebeer commented on June 4, 2024

Hey @Alirezanezamdoost, thanks for the extra info!

For the W&B error, I just pushed a change that should let you select option 1.

For the "file contains data in an unknown format" error, could you try directly reading a file from the AEC dataset? Something like:

import soundfile as sf
sf.read('/content/AEC-Challenge main/datasets/synthetic/farend_speech/farend_speech_fileid_0.wav')

from metaaf.

Alirezanezamdoost avatar Alirezanezamdoost commented on June 4, 2024

Thank you for your kind consideration.
I am reading a file from the AEC dataset and it was working and I think it is not related to the dataset. But still, I have the problem of "file contains data in an unknown format" when I select option 1.

from metaaf.

jmcasebeer avatar jmcasebeer commented on June 4, 2024

Does loading from the dataset/dataloader work? Something like:

dset = aec.MSFTAECDataset_RIR(mode='test', double_talk=True, random_roll=True, scene_change=False) 
data = dset[0]

If not, could you please include the full stack trace of the error?

from metaaf.

Alirezanezamdoost avatar Alirezanezamdoost commented on June 4, 2024

Thank you for your reply.

{'b1': 0.99,
'batch_size': 64,
'dataset': 'linear',
'double_talk': True,
'early_stop_patience': 4,
'extra_signals': 'ude',
'h_size': 32,
'hop_size': 1024,
'input_transform': 'log1p',
'is_real': True,
'lam_1': 0.01,
'n_devices': 1,
'n_frames': 1,
'n_in_chan': 1,
'n_layers': 2,
'n_out_chan': 1,
'name': 'auto_rls_16_dt_c',
'optimizer': 'gru',
'outer_loss': 'log_self_mse',
'pad_size': 0,
'random_roll': True,
'reduce_lr_patience': 1,
'scene_change': False,
'total_epochs': 1000,
'unroll': 16,
'val_period': 10,
'window_size': 2048}

RuntimeError Traceback (most recent call last)
in ()
39 #dset = aec.MSFTAECDataset_RIR(mode='test', double_talk=True, random_roll=True, scene_change=False)
40 dset = aec.MSFTAECDataset_RIR(mode='test', double_talk=True, random_roll=True, scene_change=True)
---> 41 data = dset[0]

5 frames
/content/MetaAF/zoo/aec/aec.py in getitem(self, idx)
282
283 def getitem(self, idx):
--> 284 data_dict = self.load_from_idx(idx)
285
286 if self.scene_change:

/content/MetaAF/zoo/aec/aec.py in load_from_idx(self, idx)
237 u, sr = sf.read(
238 os.path.join(
--> 239 self.farend_speech_dir, f"farend_speech_fileid_{speech_idx}.wav"
240 )
241 )

/usr/local/lib/python3.7/dist-packages/soundfile.py in read(file, frames, start, stop, dtype, always_2d, fill_value, out, samplerate, channels, format, subtype, endian, closefd)
255 """
256 with SoundFile(file, 'r', samplerate, channels,
--> 257 subtype, endian, format, closefd) as f:
258 frames = f._prepare_read(start, stop, frames)
259 data = f.read(frames, dtype, always_2d, fill_value, out)

/usr/local/lib/python3.7/dist-packages/soundfile.py in init(self, file, mode, samplerate, channels, subtype, endian, format, closefd)
627 self._info = _create_info_struct(file, mode, samplerate, channels,
628 format, subtype, endian)
--> 629 self._file = self._open(file, mode_int, closefd)
630 if set(mode).issuperset('r+') and self.seekable():
631 # Move write position to 0 (like in Python file objects)

/usr/local/lib/python3.7/dist-packages/soundfile.py in _open(self, file, mode_int, closefd)
1182 raise TypeError("Invalid file: {0!r}".format(self.name))
1183 _error_check(_snd.sf_error(file_ptr),
-> 1184 "Error opening {0!r}: ".format(self.name))
1185 if mode_int == _snd.SFM_WRITE:
1186 # Due to a bug in libsndfile version <= 1.0.25, frames != 0

/usr/local/lib/python3.7/dist-packages/soundfile.py in _error_check(err, prefix)
1355 if err != 0:
1356 err_str = _snd.sf_error_number(err)
-> 1357 raise RuntimeError(prefix + _ffi.string(err_str).decode('utf-8', 'replace'))
1358
1359

RuntimeError: Error opening '/content/AEC-Challenge-main/datasets/synthetic/farend_speech/farend_speech_fileid_0.wav': File contains data in an unknown format.

from metaaf.

jmcasebeer avatar jmcasebeer commented on June 4, 2024

And you confirmed that you can directly sf.read() that same file in the same environment?

dset = aec.MSFTAECDataset_RIR(mode='test', double_talk=True, random_roll=True, scene_change=True)
sf.read('/content/AEC-Challenge-main/datasets/synthetic/farend_speech/farend_speech_fileid_0.wav')
data = dset[0]

Does the dataset crash for all indices or just index 0? Can you check some other index likedset[42]?

from metaaf.

Alirezanezamdoost avatar Alirezanezamdoost commented on June 4, 2024

I can not read all files in the far-end speech like "farend_speech/farend_speech_fileid_0.wav" but the others like '/content/AEC-Challenge-main/baseline/icassp2021/clean/0YP1nl3pDk6paW0ZYAPdpg_doubletalk.wav' is runnable.
All the farend and naerend is not readable.

from metaaf.

jmcasebeer avatar jmcasebeer commented on June 4, 2024

Seems like an issue with the Microsoft AEC challenge dataset download. How large is the synthetic dataset fold? Did it get fully Downloaded?

I am happy to help but the folks that host the challenge dataset may be more useful.

from metaaf.

Alirezanezamdoost avatar Alirezanezamdoost commented on June 4, 2024

I have downloaded the Microsoft AEC challenge dataset completely. I tried to play the farend and nearend with the player on the laptop but it did not work correctly. I think the dataset has crashed. I have run your code directly on Colab and given them all the path truly. At this time what do I have to do to gain the result? do you have any suggestions or other paths to take the dataset? Do you know why the dataset does not work at this time? Is there a problem with the host?

from metaaf.

jmcasebeer avatar jmcasebeer commented on June 4, 2024

If you want to train the model, you first need the dataset. It sounds like something went wrong with your download. You should be able to listen to the farend and nearend samples without issue. You can get help with downloading the dataset here. I don't maintain or host the dataset.

If you just want to evaluate the models, I released model checkpoints here.

from metaaf.

Related Issues (10)

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.