Open taiman9 opened 3 years ago
Hi @taiman9 I feel like this model isn't fine-tuned one. Could you try to use fine-tuned one?
Hi @jubick1337,
Thanks for replying. I just ran one of the finetuned models using the following command:
python examples/speech_recognition/infer.py /path/to/manifest/ --task audio_pretraining --nbest 1 --path /path/to/wav2vec2_vox_960h_new.pt --gen-subset dev-other --results-path /path/to/dev-results --w2l-decoder viterbi --word-score -1 --sil-weight 0 --criterion ctc --labels ltr --max-tokens 4000000 --post-process letter
Then I got the following error message:
Traceback (most recent call last):
File "examples/speech_recognition/infer.py", line 428, in <module>
cli_main()
File "examples/speech_recognition/infer.py", line 424, in cli_main
main(args)
File "examples/speech_recognition/infer.py", line 237, in main
state=model_state,
File "/home/tsiddiqui/fairseq/fairseq/checkpoint_utils.py", line 269, in load_model_ensemble
state,
File "/home/tsiddiqui/fairseq/fairseq/checkpoint_utils.py", line 304, in load_model_ensemble_and_task
state = load_checkpoint_to_cpu(filename, arg_overrides)
File "/home/tsiddiqui/fairseq/fairseq/checkpoint_utils.py", line 238, in load_checkpoint_to_cpu
state = _upgrade_state_dict(state)
File "/home/tsiddiqui/fairseq/fairseq/checkpoint_utils.py", line 493, in _upgrade_state_dict
state["cfg"] = convert_namespace_to_omegaconf(state["args"])
File "/home/tsiddiqui/fairseq/fairseq/dataclass/utils.py", line 351, in convert_namespace_to_omegaconf
composed_cfg = compose("config", overrides=overrides, strict=False)
TypeError: compose() got an unexpected keyword argument 'strict'
Would you know what the issue is?
I don't know exactly but seems like building model error Try previous versions of fairseq as fairseq have changed configs/builders a lot
π Bug
I am trying to obtain inference for sample flac files (in a directory) using the 'infer.py' script in fairseq.
To Reproduce
I installed fairseq using the following commands:
I installed wav2letter python dependencies as instructed in: wav2letter python bindings
I installed wav2letter python bindings with the for the CUDA dependency (with env variable
USE_CUDA=1
) with the following commands after installing its dependencies:Then I ran the following command to obtain the manifest of my sample flac files in fairseq:
$ python examples/wav2vec/wav2vec_manifest.py /path/to/flacs --dest /manifest/path --ext flac --valid-percent 0
This above command was to obtain the manifest of the flac files (10 to 30 secs in length each) in a directory called
dev-other
. It created a .tsv file for my flacs in the manifest path which I nameddev-other.tsv
. I also included the letter dictionary file dict.ltr.txt in the manifest path.Then I ran inference using the
Wav2Vec 2.0 Large (LV-60 + CV + SWBD + FSH)
pre-trained model from: https://github.com/pytorch/fairseq/tree/master/examples/wav2vecI ran inference in fairseq using the following command:
I got the following error message upon running the inference command:
Could someone please explain what is causing this error message and how to resolve it?
PS. - I also tried running inference using a language model but got similar error message. If you could provide the full inference command to run inference using the kenlm or fairseqlm model, it would be appreciated.
Environment
pip
, source): pipNVIDIA GeForce RTX 2080 Ti/NVIDIA TITAN RTX
Help to fix the issue would be highly appreciated! I need to try to resolve this as soon as possible!