You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if the text is longer than the fixed length the sentence gets trimmed, however, when the output is shorter it gets padded with a tone at the end.
To Reproduce
importnumpyasnpfromTTS.tts.configs.vits_configimportVitsConfigfromTTS.tts.models.vitsimportVitsfromTTS.utils.audio.numpy_transformsimportsave_wavconfig_path="../coqui-TTS/coqui-ai-TTS/tts_models--en--ljspeech--vits/config.json"model_path="../coqui-TTS/coqui-ai-TTS/coqui_ljspeech.onnx"config=VitsConfig()
config.load_json(config_path)
vits=Vits.init_from_config(config)
vits.load_onnx(model_path)
text="Hello world, this is the widely known voice of ljspeech dataset."text_inputs=np.asarray(
vits.tokenizer.text_to_ids(text, language=None),
dtype=np.int64,
)[None, :]
audio=vits.inference_onnx(text_inputs)
save_wav(wav=audio[0], path="test_onnx_coqui.wav", sample_rate=config.audio.sample_rate)
Describe the bug
The models exported to Onnx always return an audio of a fixed length which is proportional to the value defined in the dummy_input in the export code.
coqui-ai-TTS/TTS/tts/models/vits.py
Line 1688 in 382b418
if the text is longer than the fixed length the sentence gets trimmed, however, when the output is shorter it gets padded with a tone at the end.
To Reproduce
Expected behavior
No response
Logs
Environment
Additional context
No response
The text was updated successfully, but these errors were encountered: