[Bug] typo in \TTS\tts\utils\text\punctuation.py, lines 140 and 151 reference attribute "punc" incorrectly as "mark"
See original GitHub issueDescribe the bug
\TTS\tts\utils\text\punctuation.py, line 140, this only gets called when the synthesizer is told to speak a string that only consists of punctuation marks, you get the error
File “F:\TTS Adventures\coqui\coqui39\lib\site-packages\TTS\tts\utils\text\punctuation.py”, line 140, in <genexpr>
return [“”.join(m.mark for m in puncs)]
AttributeError: ‘_punc_index’ object has no attribute ‘mark’
I also notice the same typo is in line 150. Poked around, looks like line 9 says _PUNC_IDX = collections.namedtuple(“_punc_index”, [“punc”, “position”]) and neither of those words are “mark”.
I’d do the fix myself but I’ve literally never requested to change a respository on github before in my life and it’s 1am local as I type this. Well, I mean, I did the fix myself on my machine, and it worked.
To Reproduce
I ran specifically the following model, where “words” was the string “!?!?!?!?!?!” or something like that to reproduce the error just now for the screenshot.
model_path, config_path, model_item = manager.download_model(“tts_models/en/vctk/vits”) synthesizer = Synthesizer( tts_checkpoint=model_path, tts_config_path=config_path, #tts_speakers_file=speakers_file_path, tts_languages_file=None, #vocoder_checkpoint=vocoder_path, #vocoder_config=vocoder_config_path, encoder_checkpoint=“”, encoder_config=“”, use_cuda=True, ) wavs = synthesizer.tts(words, speaker_name=“p311”, style_wav=None) out = Path(file).parent/out_path synthesizer.save_wav(wavs, out)
Expected behavior
No response
Logs
No response
Environment
{
"CUDA": {
"GPU": [
"NVIDIA GeForce RTX 3090"
],
"available": true,
"version": "11.6"
},
"Packages": {
"PyTorch_debug": false,
"PyTorch_version": "1.12.0+cu116",
"TTS": "0.6.2",
"numpy": "1.19.5"
},
"System": {
"OS": "Windows",
"architecture": [
"64bit",
"WindowsPE"
],
"processor": "Intel64 Family 6 Model 158 Stepping 9, GenuineIntel",
"python": "3.9.13",
"version": "10.0.19044"
}
}
Additional context
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top GitHub Comments
Yep that fixed it 👍
@WeberJulian Can you check this?