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

StyleTTS Python API doesn't detect devanagari script #272

Open
tanishbajaj101 opened this issue Jul 19, 2024 · 0 comments
Open

StyleTTS Python API doesn't detect devanagari script #272

tanishbajaj101 opened this issue Jul 19, 2024 · 0 comments

Comments

@tanishbajaj101
Copy link

the script works fine for latin characters, I trained the checkpoint on phonemization of hindi text
But on passing it devanagari script it gives me error

Traceback (most recent call last):
File "C:\StyleTTS2\tts.py", line 7, in
other_tts.inference("कैसे हो आप", output_wav_file="another_test.wav")
File "C:\StyleTTS2\virt\lib\site-packages\styletts2\tts.py", line 273, in inference
pred_aln_trg[i, c_frame:c_frame + int(pred_dur[i].data)] = 1
IndexError: invalid index of a 0-dim tensor. Use tensor.item() in Python or tensor.item<T>() in C++ to convert a 0-dim tensor to a number

from styletts2 import tts

Specific paths to a checkpoint and config can also be provided.

other_tts = tts.StyleTTS2(model_checkpoint_path='Models/LJSpeech/epoch_2nd_00004.pth')

Specify target voice to clone. When no target voice is provided, a default voice will be used.

other_tts.inference("कैसे हो आप", output_wav_file="another_test.wav")

this is the python code im trying to run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant