sherpa-onnx icon indicating copy to clipboard operation
sherpa-onnx copied to clipboard

TTS model (vits-melo-tts-zh_en) does not work

Open YonghaoHe opened this issue 1 year ago • 8 comments

image I follow the instructions to try TTS model vits-melo-tts-zh_en, but the script proposed the bug : audio = tts.generate(args.text, sid=args.sid, speed=args.speed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ IndexError: invalid unordered_map<K, T> key what's going on?

YonghaoHe avatar Jul 31 '24 07:07 YonghaoHe

Please post complete error logs

csukuangfj avatar Jul 31 '24 08:07 csukuangfj

command: --vits-model=./vits-melo-tts-zh_en/model.onnx --vits-lexicon=./vits-melo-tts-zh_en/lexicon.txt --vits-tokens=./vits-melo-tts-zh_en/tokens.txt --vits-dict-dir=./vits-melo-tts-zh_en/dict --output-filename=./zh-en-3.wav "它也支持繁体字. 我相信你們一定聽過愛迪生說過的這句話Genius is one percent inspiration and ninety-nine percent perspiration. "

error: 2024-07-31 16:13:47,214 INFO [offline-tts-play.py:327] Loading model ... 2024-07-31 16:13:49,712 INFO [offline-tts-play.py:329] Loading model done. 2024-07-31 16:13:49,712 INFO [offline-tts-play.py:337] Start generating ... Traceback (most recent call last): File "D:\python_projects\robot-demo\tts\offline-tts-play.py", line 390, in main() File "D:\python_projects\robot-demo\tts\offline-tts-play.py", line 339, in main audio = tts.generate( ^^^^^^^^^^^^^ IndexError: invalid unordered_map<K, T> key

@csukuangfj

YonghaoHe avatar Jul 31 '24 08:07 YonghaoHe

please post the complete command and logs

csukuangfj avatar Jul 31 '24 08:07 csukuangfj

by the way, you can post screenshots.

csukuangfj avatar Jul 31 '24 08:07 csukuangfj

this screenshot should contain all you need: image

@csukuangfj

YonghaoHe avatar Jul 31 '24 08:07 YonghaoHe

I checked the model files and they are correct. I think something wrong with encoding?

YonghaoHe avatar Jul 31 '24 08:07 YonghaoHe

Maybe you can use git bash or cmd to replace powershell and try again.

csukuangfj avatar Jul 31 '24 08:07 csukuangfj

make sure you are using the latest version of sherpa-onnx. Please use

pip install -U sherpa-onnx

to install the latest version.

csukuangfj avatar Jul 31 '24 08:07 csukuangfj

@YonghaoHe Are you able to run it now?

csukuangfj avatar Aug 24 '24 09:08 csukuangfj