Closed wukonggeo closed 4 months ago
please follow the FAQs in the doc to.use UTF8 encoding.
Thank you for your reply,It works.How can i use python code to run the model whitout use the cmd command?
please see the python-api-examples folder
I have checked the relevant code-offline-tts.py,how can i encode the text to UTF-8 in python code, not by system? Where should I change the src code?
Where should I change the src code?
You don't need to do anything.
Please first run it. If you have any issues, please post error logs.
The system environment has been changed to UTF-8 and demo test was successful. But I don't want to change the system encoding.Can't directly pass the UTF-8 encoding data to the model by using python?
please post your error logs.
sherpa-onnx-offline-tts --debug --sid=102 --vits-model=vits-zh-hf-fanchen-C\vits-zh-hf-fanchen-C.onnx --vits-dict-dir=vits-zh-hf-fanchen-C\dict --vits-lexicon=vits-zh-hf-fanchen-C\lexicon.txt --vits-tokens=vits-zh-hf-fanchen-C\tokens.txt --tts-rule-fsts=vits-zh-hf-fanchen-C\number.fst --vits-length-scale=1.0 --output-filename="heteronym-102.wav" "当夜幕降临,星光点点,伴随着微风拂面,我在静谧中感受着时光的流转。" D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx\csrc\parse-options.cc:Read:361 sherpa-onnx-offline-tts --debug --sid=102 '--vits-model=vits-zh-hf-fanchen-C\vits-zh-hf-fanchen-C.onnx' '--vits-dict-dir=vits-zh-hf-fanchen-C\dict' '--vits-lexicon=vits-zh-hf-fanchen-C\lexicon.txt' '--vits-tokens=vits-zh-hf-fanchen-C\tokens.txt' '--tts-rule-fsts=vits-zh-hf-fanchen-C\number.fst' --vits-length-scale=1.0 --output-filename=heteronym-102.wav '当夜幕降临,星光点点,伴随着微风拂面,我在静谧中感受着时光的流转。'
D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx\csrc\offline-tts-vits-model.cc:Init:79 ---vits model--- punctuation=, . : ; ! ? 锛?銆?锛?锛?锛?锛?銆? model_type=vits jieba=1 comment=hf-vits-models-fanchen-C language=Chinese add_blank=1 n_speakers=187 sample_rate=16000 ----------input names---------- 0 x 1 x_length 2 noise_scale 3 length_scale 4 noise_scale_w 5 sid ----------output names---------- 0 y
D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx/csrc/offline-tts-vits-impl.h:OfflineTtsVitsImpl:48 rule fst: C:\Users\x\Downloads\openai\TTS\vits-zh-hf-fanchen-C\number.fst D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx/csrc/offline-tts-vits-impl.h:Generate:165 Raw text: 当夜幕降临,星光点点,伴随着微风拂面,我在静谧中感受着时光的流转。 D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx/csrc/offline-tts-vits-impl.h:Generate:172 After normalizing: D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx\csrc\jieba-lexicon.cc:ConvertTextToTokenIds:77 input text: D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx\csrc\jieba-lexicon.cc:ConvertTextToTokenIds:78 after replacing punctuations: D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx\csrc\jieba-lexicon.cc:ConvertTextToTokenIds:87 after jieba processing: D:\a\sherpa-onnx\sherpa-onnx\sherpa-onnx/csrc/offline-tts-vits-impl.h:Generate:181 Failed to convert to token IDs Error in generating audio. Please read previous error messages.
OS:WIN11 Python:3.9