microsoft / SpeechT5

Unified-Modal Speech-Text Pre-Training for Spoken Language Processing
MIT License
1.16k stars 113 forks source link

ArgumentError in SpeechT5Task.add_args() when running fairseq-generate #7

Closed busukxuan closed 2 years ago

busukxuan commented 2 years ago

Hi,

I tried running fairseq-generate according to the instructions in the README. It crashed at tasks/speecht5.py line 173, with the following message exception:

argparse.ArgumentError: argument --mask-length: conflicting option string: --mask-length

I used the debugger and found that there is already an existing --mask-length argument configured in the parser, it was added from fairseq/fairseq/options.py line 149, where arguments from wav2vec2 were added. Apparently fairseq's generate.py sets wav2vec2 as the default for --arch.

I tried manually specifying the --arch argument as t5_transformer_base or t5_transformer_base_asr, but then the argument parser complains that --path is not a supported argument.

My versions are SpeechT5 commit f9b059be96fcdfbf2f90dc8628fb37acaa2067ac and fairseq commit e35c593c84bd84d5c7777ef7ace98dab508ff88e.

Any idea how to fix it, preferably without modifying fairseq code? Thanks.

busukxuan commented 2 years ago

My bad, I missed the fact that the SpeechT5 code depends on a specific version of fairseq. It works fine now. Closing.