phanxuanphucnd / wav2kws

Wav2kws is keyword spotting (KWS) based on Wav2Vec 2.0. This model shows state-of-the-art in Google Speech Commands datasets V1 and V2.
MIT License
11 stars 3 forks source link

Module not found "Speech Commands" #2

Open salmaShahid opened 1 year ago

salmaShahid commented 1 year ago

From where i can find this speech_commands folder/file

from speech_commands.input_data import AudioProcessor

phanxuanphucnd commented 1 year ago

@salmaShahid

The "speech_commands.input_data" module appears to be part of the TensorFlow Speech Command Recognition example code, which can be found in the TensorFlow GitHub repository.

You can find the "AudioProcessor" class by navigating to the following path in the repository:

tensorflow/examples/speech_commands/input_data.py

Once you've located the input_data.py file, you can import the AudioProcessor class using the following code:

from speech_commands.input_data import AudioProcessor

Make sure that you have TensorFlow installed and that you have downloaded the Speech Commands dataset before attempting to use this code.

salmaShahid commented 1 year ago

ok. can you please provide me the requirement.txt file; because in colab, i am facing version issues;

salmaShahid commented 1 year ago

It generates this error and i have downloaded the dataset

File "downstream_kws.py", line 263, in tf_ap = AudioProcessor("", args.dataset, 10, 10, File "/content/Wav2Keyword/input_data.py", line 181, in init self.prepare_data_index(silence_percentage, unknown_percentage, File "/content/Wav2Keyword/input_data.py", line 284, in prepare_data_index silence_wav_path = self.data_index['training'][1]['file'] IndexError: list index out of range