How to perform inference on self trained model?
See original GitHub issueHi There,
Thanks for this great tutorial, I have trained the ASR model, with the colab notebook, ASRfromScratch. I get the following files in the folder (named: CKPT+2021-09-28+05-51-12+00): brain.ckpt CKPT.yaml counter.ckpt dataloader-Train.ckpt model.ckpt normalizer.ckpt optimizer.ckpt scheduler.ckpt
from speechbrain.pretrained import EncoderDecoderASR
asr_model = EncoderDecoderASR.from_hparams(source="speechbrain/asr-crdnn-rnnlm-librispeech", savedir="pretrained_model")
audio_file = 'speechbrain/asr-crdnn-rnnlm-librispeech/example.wav'
asr_model.transcribe_file(audio_file)
Here I tried to change source to CKPT+2021-09-28+05-51-12+00
from speechbrain.pretrained import EncoderDecoderASR
asr_model = EncoderDecoderASR.from_hparams(source="CKPT+2021-09-28+05-51-12+00")
audio_file = 'speechbrain/asr-crdnn-rnnlm-librispeech/example.wav'
asr_model.transcribe_file(audio_file)
I get the error: FileNotFoundError: [Errno 2] No such file or directory: ‘pretrained_models/EncoderDecoderASR–8767517085281277641/hyperparams.yaml’
when I copied hyperparams.yaml from existing model to this folder.
OSError: [Errno 95] Operation not supported: ‘/content/drive/MyDrive/speechbrain/speechbrain/templates/speech_recognition/ASR/results/CRDNN_BPE_960h_LM/2602/save/CKPT+2021-09-28+05-51-12+00/normalizer.ckpt’ -> 'pretrained_models/EncoderDecoderASR–8767517085281277641/normalizer.ckpt
Issue Analytics
- State:
- Created 2 years ago
- Comments:18
Top GitHub Comments
source must be the directory containing all the loadable, save_dir is where you want to store the results / links to the models of the source.
it means that this path cannot be identified as a path. I never ran that on Colab, but you have to check if there is anything specific about it.