Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: tts[in windows], text is chinese #17

Open
ghjdegithub opened this issue Oct 18, 2024 · 8 comments
Open

bug: tts[in windows], text is chinese #17

ghjdegithub opened this issue Oct 18, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@ghjdegithub
Copy link
Contributor

os: windows 10
when use examples\tts.rs.
use params: -- text "真诚就是不欺人也不自欺。热爱就是全心投入并享受其中。"
error:
image

@ghjdegithub
Copy link
Contributor Author

os: windows 10 when use examples\tts.rs. use params: -- text "真诚就是不欺人也不自欺。热爱就是全心投入并享受其中。" error: image

This is what happens when it runs under debug.

When I run it under release it is just fine.

@thewh1teagle
Copy link
Owner

@ghjdegithub

Can you try edit the text in the file and pass it directly instead of passing it from the console?

@ghjdegithub
Copy link
Contributor Author

@ghjdegithub

Can you try edit the text in the file and pass it directly instead of passing it from the console?

I tried hardcoding this string of Chinese text directly, same error as this one.

@ghjdegithub
Copy link
Contributor Author

@ghjdegithub

Can you try edit the text in the file and pass it directly instead of passing it from the console?

My initial guess is that there's something wrong with rust's string to cstring conversion macro in debug mode

@thewh1teagle
Copy link
Owner

@ghjdegithub

What's the exact model you use? (and tokens file & lexicon)

@ghjdegithub
Copy link
Contributor Author

@ghjdegithub

What's the exact model you use? (and tokens file & lexicon)您使用的具体型号是什么? (以及标记文件和词典)

Here are my input parameters:
--text "真诚就是不欺人也不自欺。热爱就是全心投入并享受其中。" --output audio.wav --tokens "vits-zh-hf-theresa/tokens.txt" --model "vits-zh-hf-theresa/theresa.onnx" --lexicon "vits-zh-hf-theresa/lexicon.txt" --dict-dir "vits-zh-hf-theresa/dict"

@thewh1teagle
Copy link
Owner

@ghjdegithub

It works for me without errors on WIndows 11.

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-zh-hf-theresa.tar.bz2
tar xvf vits-zh-hf-theresa.tar.bz2
rm vits-zh-hf-theresa.tar.bz2
cargo run --example tts -- --text "真诚就是不欺人也不自欺。热爱就是全心投入并享受其中。" --output audio.wav --tokens "vits-zh-hf-theresa/tokens.txt" --model "vits-zh-hf-theresa/theresa.onnx" --lexicon "vits-zh-hf-theresa/lexicon.txt" --dict-dir "vits-zh-hf-theresa/dict"

@ghjdegithub
Copy link
Contributor Author

@ghjdegithub

It works for me without errors on WIndows 11.

wget https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/vits-zh-hf-theresa.tar.bz2

tar xvf vits-zh-hf-theresa.tar.bz2

rm vits-zh-hf-theresa.tar.bz2

cargo run --example tts -- --text "真诚就是不欺人也不自欺。热爱就是全心投入并享受其中。" --output audio.wav --tokens "vits-zh-hf-theresa/tokens.txt" --model "vits-zh-hf-theresa/theresa.onnx" --lexicon "vits-zh-hf-theresa/lexicon.txt" --dict-dir "vits-zh-hf-theresa/dict"

Mine is win10.

@thewh1teagle thewh1teagle added the bug Something isn't working label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants