modelscope / FunCodec

FunCodec is a research-oriented toolkit for audio quantization and downstream applications, such as text-to-speech synthesis, music generation et.al.
https://funcodec.github.io/
MIT License
371 stars 30 forks source link

LauraTTS: no attribute of "text_encoder" #8

Closed wsstriving closed 8 months ago

wsstriving commented 11 months ago

Description: Directly running demo.sh as guided in the Readme will throw an error as :

AttributeError: 'Namespace' object has no attribute 'text_encoder'

ZhihaoDU commented 11 months ago

Thanks for your bug report. I take a mistake on the model name in the README. I have fixed it in the last commit, please check it. The model name should be speech_synthesizer-laura-en-libritts-16k-codec_nq2-pytorch, the whole script should be like this:

cd egs/LibriTTS/text2speech_laura
model_name="speech_synthesizer-laura-en-libritts-16k-codec_nq2-pytorch"

# 1. free generation, the synthesized files are saved in results dir
bash demo.sh --stage 1 --model_name ${model_name} --output_dir results --text "nothing was to be done but to put about, and return in disappointment towards the north."

# 2. zero-shot generation given prompt text and audio, the synthesized files are saved in results dir
bash demo.sh --stage 2 --model_name ${model_name} --output_dir results --text "nothing was to be done but to put about, and return in disappointment towards the north." \
  --prompt_text "one of these is context" --prompt_audio "demo/8230_279154_000013_000003.wav"