GeezerVison is showing github.com — Recipe test fixes (#2874) · speechbrain/speechbrain@89cd54f
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/pythonapp.yml +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 30 | 30 | run: | | 31 | 31 | pip install uv | 32 | 32 | uv pip install --system ctc-segmentation sacrebleu # ctc-segmentation is funky with uv due to their oldest-supported-numpy dependency | 33 | | - uv pip install --system -r requirements.txt torch==2.6.0+cpu torchaudio==2.6.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu k2==1.24.4.dev20250307+cpu.torch2.6.0 --find-links https://k2-fsa.github.io/k2/cpu.html gensim==4.3.2 bitsandbytes==0.45.3 scikit-learn==1.6.1 | | 33 | + uv pip install --system -r requirements.txt torch==2.6.0+cpu torchaudio==2.6.0+cpu --extra-index-url https://download.pytorch.org/whl/cpu k2==1.24.4.dev20250307+cpu.torch2.6.0 --find-links https://k2-fsa.github.io/k2/cpu.html gensim==4.3.2 bitsandbytes==0.45.3 scikit-learn==1.6.1 accelerate | 34 | 34 | uv pip install --system --editable . --no-deps # already installed pinned deps from requirements.txt, we're good | 35 | 35 | - name: Install sox | 36 | 36 | run: | | |
Collapse file Copy file name to clipboardExpand all lines: recipes/LJSpeech/quantization/train.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -142,7 +142,7 @@ def dataio_prepare(hparams): | 142 | 142 | """ | 143 | 143 | train_data = sb.dataio.dataset.DynamicItemDataset.from_json( | 144 | 144 | json_path=hparams["train_json"], | 145 | | - replacements={"DATA_ROOT": hparams["data_folder"]}, | | 145 | + replacements={"data_root": hparams["data_folder"]}, | 146 | 146 | ) | 147 | 147 | # Sort training data to speed up training | 148 | 148 | train_data = train_data.filtered_sorted( | @@ -153,7 +153,7 @@ def dataio_prepare(hparams): | 153 | 153 |
| 154 | 154 | valid_data = sb.dataio.dataset.DynamicItemDataset.from_json( | 155 | 155 | json_path=hparams["valid_json"], | 156 | | - replacements={"DATA_ROOT": hparams["data_folder"]}, | | 156 | + replacements={"data_root": hparams["data_folder"]}, | 157 | 157 | ) | 158 | 158 | # Sort validation data to speed up validation | 159 | 159 | valid_data = valid_data.filtered_sorted( | @@ -164,7 +164,7 @@ def dataio_prepare(hparams): | 164 | 164 |
| 165 | 165 | test_data = sb.dataio.dataset.DynamicItemDataset.from_json( | 166 | 166 | json_path=hparams["test_json"], | 167 | | - replacements={"DATA_ROOT": hparams["data_folder"]}, | | 167 | + replacements={"data_root": hparams["data_folder"]}, | 168 | 168 | ) | 169 | 169 | # Sort the test data to speed up testing | 170 | 170 | test_data = test_data.filtered_sorted( | |
Collapse file Copy file name to clipboardExpand all lines: recipes/Voicebank/dereverb/MetricGAN-U/train.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -401,7 +401,7 @@ def write_wavs(self, batch_id, wavs, score, lens): | 401 | 401 | for i, (name, pred_wav, length) in enumerate(zip(batch_id, wavs, lens)): | 402 | 402 | path = os.path.join(self.hparams.MetricGAN_folder, name + ".wav") | 403 | 403 | data = torch.unsqueeze(pred_wav[: int(length)].cpu(), 0) | 404 | | - torchaudio.save(path, data, self.hparams.Sample_rate) | | 404 | + torchaudio.save(path, data.detach(), self.hparams.Sample_rate) | 405 | 405 |
| 406 | 406 | # Make record of path and score for historical training | 407 | 407 | score = float(score[i][0]) | |
Collapse file Copy file name to clipboardExpand all lines: recipes/Voicebank/enhance/MetricGAN-U/train.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -394,7 +394,7 @@ def write_wavs(self, batch_id, wavs, score, lens): | 394 | 394 | for i, (name, pred_wav, length) in enumerate(zip(batch_id, wavs, lens)): | 395 | 395 | path = os.path.join(self.hparams.MetricGAN_folder, name + ".wav") | 396 | 396 | data = torch.unsqueeze(pred_wav[: int(length)].cpu(), 0) | 397 | | - torchaudio.save(path, data, self.hparams.Sample_rate) | | 397 | + torchaudio.save(path, data.detach(), self.hparams.Sample_rate) | 398 | 398 |
| 399 | 399 | # Make record of path and score for historical training | 400 | 400 | score = float(score[i][0]) | |
Collapse file Copy file name to clipboardExpand all lines: recipes/Voicebank/enhance/MetricGAN/train.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -280,7 +280,7 @@ def write_wavs(self, batch_id, wavs, clean_paths, scores, lens): | 280 | 280 | ): | 281 | 281 | path = os.path.join(self.hparams.MetricGAN_folder, name + ".wav") | 282 | 282 | data = torch.unsqueeze(pred_wav[: int(length)].cpu(), 0) | 283 | | - torchaudio.save(path, data, self.hparams.Sample_rate) | | 283 | + torchaudio.save(path, data.detach(), self.hparams.Sample_rate) | 284 | 284 |
| 285 | 285 | # Make record of path and score for historical training | 286 | 286 | score = float(scores[i][0]) | |
Collapse file Copy file name to clipboardExpand all lines: recipes/timers-and-such/decoupled/hparams/train_TAS_LM.yaml +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -79,9 +79,9 @@ asr_model: !apply:speechbrain.inference.ASR.EncoderDecoderASR.from_hparams | 79 | 79 | embedding_dim: 128 | 80 | 80 | dropout: 0. | 81 | 81 | rnn_layers: 2 | 82 | | - rnn_neurons: 2048 | | 82 | + rnn_neurons: 1024 | 83 | 83 | dnn_blocks: 1 | 84 | | - dnn_neurons: 512 | | 84 | + dnn_neurons: 1024 | 85 | 85 | return_hidden: True | 86 | 86 | pretrainer: | 87 | 87 | paths: | |
Collapse file Copy file name to clipboardExpand all lines: recipes/timers-and-such/multistage/hparams/train_TAS_LM.yaml +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -137,9 +137,9 @@ asr_model: !apply:speechbrain.inference.ASR.EncoderDecoderASR.from_hparams | 137 | 137 | embedding_dim: 128 | 138 | 138 | dropout: 0. | 139 | 139 | rnn_layers: 2 | 140 | | - rnn_neurons: 2048 | | 140 | + rnn_neurons: 1024 | 141 | 141 | dnn_blocks: 1 | 142 | | - dnn_neurons: 512 | | 142 | + dnn_neurons: 1024 | 143 | 143 | return_hidden: True | 144 | 144 | pretrainer: | 145 | 145 | paths: | |
Collapse file Copy file name to clipboard +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | Task,Dataset,Script_file,Hparam_file,Data_prep_file,Readme_file,Result_url,HF_repo,test_debug_flags,test_debug_checks,performance | 2 | 2 | ASR-CTC,GigaSpeech,recipes/GigaSpeech/ASR/CTC/train_with_wavlm.py,recipes/GigaSpeech/ASR/CTC/hparams/train_hf_wavlm.yaml,recipes/GigaSpeech/ASR/CTC/gigaspeech_prepare.py,recipes/GigaSpeech/ASR/CTC/README.md,,,--data_folder=tests/samples/ASR/ --train_csv=tests/samples/annotation/ASR_train.csv --valid_csv=tests/samples/annotation/ASR_train.csv --test_csv=tests/samples/annotation/ASR_train.csv --number_of_epochs=1 --skip_prep=True --wav2vec2_folder=tests/tmp/wav2vec2_checkpoint, | 3 | | -ASR-Transducers,GigaSpeech,recipes/GigaSpeech/ASR/transducer/train.py,recipes/GigaSpeech/ASR/transducer/hparams/conformer_transducer.yaml,recipes/GigaSpeech/ASR/transducer/gigaspeech_prepare.py,recipes/GigaSpeech/ASR/transducer/README.md,,,--data_folder=tests/samples/ASR/ --train_csv=tests/samples/annotation/ASR_train.csv --valid_csv=tests/samples/annotation/ASR_train.csv --test_csv=tests/samples/annotation/ASR_train.csv --number_of_epochs=1 --skip_prep=True, | | 3 | +ASR-Transducers,GigaSpeech,recipes/GigaSpeech/ASR/transducer/train.py,recipes/GigaSpeech/ASR/transducer/hparams/conformer_transducer.yaml,recipes/GigaSpeech/ASR/transducer/gigaspeech_prepare.py,recipes/GigaSpeech/ASR/transducer/README.md,,,--data_folder=tests/samples/ASR/ --train_csv=tests/samples/annotation/ASR_train.csv --valid_csv=tests/samples/annotation/ASR_train.csv --test_csv=tests/samples/annotation/ASR_train.csv --number_of_epochs=1 --output_neurons=29 --skip_prep=True --use_torchaudio=True, |
Collapse file Copy file name to clipboardExpand all lines: tests/recipes/LJSpeech.csv +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,4 +5,4 @@ TTS,LJSpeech,recipes/LJSpeech/TTS/tacotron2/train.py,recipes/LJSpeech/TTS/tacotr | 5 | 5 | TTS,LJSpeech,recipes/LJSpeech/TTS/vocoder/hifigan/train.py,recipes/LJSpeech/TTS/vocoder/hifigan/hparams/train.yaml,recipes/LJSpeech/ljspeech_prepare.py,recipes/LJSpeech/TTS/README.md,https://www.dropbox.com/sh/m2xrdssiroipn8g/AAD-TqPYLrSg6eNxUkcImeg4a?dl=0,https://huggingface.co/speechbrain/tts-hifigan-ljspeech,--epochs=2 --data_folder=tests/samples/ASR --train_json=tests/samples/annotation/ASR_train.json --valid_json=tests/samples/annotation/ASR_dev.json --test_json=tests/samples/annotation/ASR_dev.json --skip_prep=True --sample_rate=16000,"file_exists=[train_log.txt,log.txt,env.log,train.py,hyperparams.yaml,samples/1/synthesized.wav,samples/1/target.wav,samples/2/synthesized.wav,samples/2/target.wav]" | 6 | 6 | TTS,LJSpeech,recipes/LJSpeech/TTS/vocoder/diffwave/train.py,recipes/LJSpeech/TTS/vocoder/diffwave/hparams/train.yaml,recipes/LJSpeech/ljspeech_prepare.py,recipes/LJSpeech/TTS/README.md,,,--number_of_epochs=2 --data_folder=tests/samples/ASR --train_json=tests/samples/annotation/ASR_train.json --valid_json=tests/samples/annotation/ASR_dev.json --test_json=tests/samples/annotation/ASR_dev.json --skip_prep=True --sample_rate=16000 --num_workers 0,"file_exists=[train_log.txt,log.txt,env.log,train.py,hyperparams.yaml]" | 7 | 7 | TTS,LJSpeech,recipes/LJSpeech/TTS/vocoder/hifigan_discrete/train.py,recipes/LJSpeech/TTS/vocoder/hifigan_discrete/hparams/train.yaml,recipes/LJSpeech/ljspeech_prepare.py,recipes/LJSpeech/TTS/README.md,,,--batch_size=2 --epochs=2 --data_folder=tests/samples/TTS --train_json=tests/samples/annotation/TTS_train.json --valid_json=tests/samples/annotation/TTS_train.json --test_json=tests/samples/annotation/TTS_train.json --skip_prep=True --sample_rate=16000 --codes_save_folder=tests/samples/TTS/codes --skip_extract=True,"file_exists=[train_log.txt,log.txt,env.log,train.py,hyperparams.yaml,samples/1/synthesized.wav,samples/1/target.wav,samples/2/synthesized.wav,samples/2/target.wav]" | 8 | | -quantization,LJSpeech,recipes/LJSpeech/quantization/train.py,recipes/LJSpeech/quantization/hparams/train_discrete_ssl.yaml,recipes/LJSpeech/quantization/ljspeech_prepare.py,recipes/LJSpeech/quantization/README.md,,https://huggingface.co/speechbrain/SSL_Quantization,--data_folder=tests/samples/TTS --train_json=tests/samples/annotation/TTS_train.json --valid_json=tests/samples/annotation/TTS_train.json --test_json=tests/samples/annotation/TTS_train.json --skip_prep=True,"file_exists=[train_log.txt,train.py,log.txt,env.log,hyperparams.yaml]" | | 8 | +quantization,LJSpeech,recipes/LJSpeech/quantization/train.py,recipes/LJSpeech/quantization/hparams/train_discrete_ssl.yaml,recipes/LJSpeech/quantization/ljspeech_prepare.py,recipes/LJSpeech/quantization/README.md,,https://huggingface.co/speechbrain/SSL_Quantization,--data_folder=tests/samples/TTS --train_json=tests/samples/annotation/TTS_train.json --valid_json=tests/samples/annotation/TTS_train.json --test_json=tests/samples/annotation/TTS_train.json --skip_prep=True --n_clusters 10 --kmeans_batch_size 10,"file_exists=[train_log.txt,train.py,log.txt,env.log,hyperparams.yaml]" |
Collapse file Copy file name to clipboardExpand all lines: tests/recipes/LibriSpeech.csv +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -45,4 +45,4 @@ ASR-CTC,LibriSpeech,recipes/LibriSpeech/ASR/CTC/train.py,recipes/LibriSpeech/ASR | 45 | 45 | ASR-CTC,LibriSpeech,recipes/LibriSpeech/ASR/CTC/train.py,recipes/LibriSpeech/ASR/CTC/hparams/branchformer_large.yaml,recipes/LibriSpeech/ASR/CTC/librispeech_prepare.py,recipes/LibriSpeech/ASR/CTC/README.md,,,--data_folder=tests/samples/ASR/ --train_csv=tests/samples/annotation/ASR_train.csv --valid_csv=tests/samples/annotation/ASR_train.csv --test_csv=[tests/samples/annotation/ASR_train.csv] --number_of_epochs=2 --skip_prep=True --output_neurons=21,"file_exists=[env.log,hyperparams.yaml,log.txt,train_log.txt,train.py,wer_ASR_train.txt,save/21_char.model,save/21_char.vocab]", | 46 | 46 | ASR-CTC,LibriSpeech,recipes/LibriSpeech/ASR/CTC/train_with_wav2vec_k2.py,recipes/LibriSpeech/ASR/CTC/hparams/train_hf_wav2vec_k2.yaml,recipes/LibriSpeech/ASR/CTC/librispeech_prepare.py,recipes/LibriSpeech/ASR/CTC/README.md,,,--data_folder=tests/samples/ASR/ --skip_prep=True --train_csv=tests/samples/annotation/ASR_train.csv --valid_csv=tests/samples/annotation/ASR_train.csv --test_csv=[tests/samples/annotation/ASR_train.csv] --number_of_epochs=2,"file_exists=[metric_ASR_train/wer_HL_1best.txt,train_log.txt,log.txt,train_with_wav2vec_k2.py,env.log,hyperparams.yaml]", | 47 | 47 | LM,LibriSpeech,recipes/LibriSpeech/LM/train_ngram.py,recipes/LibriSpeech/LM/hparams/train_ngram.yaml,recipes/LibriSpeech/LM/librispeech_prepare.py,recipes/LibriSpeech/LM/README.md,,,--data_folder=tests/samples/ASR/ --skip_prep=True --train_csv=tests/samples/annotation/ASR_train.csv,"file_exists=[env.log,hyperparams.yaml,log.txt,lang/words.txt,libri_lm_corpus.txt,train_ngram.py]", | 48 | | -quantization,LibriSpeech,recipes/LibriSpeech/quantization/train.py,recipes/LibriSpeech/quantization/hparams/train_discrete_ssl.yaml,recipes/LibriSpeech/quantization/librispeech_prepare.py,recipes/LibriSpeech/quantization/README.md,,,--data_folder=tests/samples/ASR/ --train_csv=tests/samples/annotation/ASR_train.csv --valid_csv=tests/samples/annotation/ASR_train.csv --test_csv=tests/samples/annotation/ASR_train.csv --skip_prep=True,"file_exists=[train_log.txt,train.py,log.txt,env.log,hyperparams.yaml]", | | 48 | +quantization,LibriSpeech,recipes/LibriSpeech/quantization/train.py,recipes/LibriSpeech/quantization/hparams/train_discrete_ssl.yaml,recipes/LibriSpeech/quantization/librispeech_prepare.py,recipes/LibriSpeech/quantization/README.md,,,--data_folder=tests/samples/ASR/ --train_csv=tests/samples/annotation/ASR_train.csv --valid_csv=tests/samples/annotation/ASR_train.csv --test_csv=tests/samples/annotation/ASR_train.csv --skip_prep=True --n_clusters 10 --kmeans_batch_size 10,"file_exists=[train_log.txt,train.py,log.txt,env.log,hyperparams.yaml]", |
|