Closed ShmingMaster closed 2 years ago
Can you pls format your post correctly?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.
This needs to be fixed by now.
Yeah same problem, punctuation code is :b:roke
File "/home/shaybox/.cache/pypoetry/virtualenvs/daily-reddit-recap-dIQ3ccPv-py3.10/lib/python3.10/site-packages/TTS/utils/synthesizer.py", line 270, in tts
outputs = synthesis(
File "/home/shaybox/.cache/pypoetry/virtualenvs/daily-reddit-recap-dIQ3ccPv-py3.10/lib/python3.10/site-packages/TTS/tts/utils/synthesis.py", line 180, in synthesis
model.tokenizer.text_to_ids(text, language=language_id),
File "/home/shaybox/.cache/pypoetry/virtualenvs/daily-reddit-recap-dIQ3ccPv-py3.10/lib/python3.10/site-packages/TTS/tts/utils/text/tokenizer.py", line 109, in text_to_ids
text = self.phonemizer.phonemize(text, separator="")
File "/home/shaybox/.cache/pypoetry/virtualenvs/daily-reddit-recap-dIQ3ccPv-py3.10/lib/python3.10/site-packages/TTS/tts/utils/text/phonemizers/base.py", line 135, in phonemize
phonemized = self._phonemize_postprocess(phonemized, punctuations)
File "/home/shaybox/.cache/pypoetry/virtualenvs/daily-reddit-recap-dIQ3ccPv-py3.10/lib/python3.10/site-packages/TTS/tts/utils/text/phonemizers/base.py", line 114, in _phonemize_postprocess
return self._punctuator.restore(phonemized, punctuations)[0]
File "/home/shaybox/.cache/pypoetry/virtualenvs/daily-reddit-recap-dIQ3ccPv-py3.10/lib/python3.10/site-packages/TTS/tts/utils/text/punctuation.py", line 130, in restore
return cls._restore(text, puncs, 0)
File "/home/shaybox/.cache/pypoetry/virtualenvs/daily-reddit-recap-dIQ3ccPv-py3.10/lib/python3.10/site-packages/TTS/tts/utils/text/punctuation.py", line 140, in _restore
return ["".join(m.mark for m in puncs)]
File "/home/shaybox/.cache/pypoetry/virtualenvs/daily-reddit-recap-dIQ3ccPv-py3.10/lib/python3.10/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'
Text that caused this:
For having lunch with my grandma on my lunch break at work. Not joking. I serve a wide area of my state and when I’m in her part of the state, which was historically underserved by the person in my position before I was, I eat lunch with her during my lunch break. The other administrators I work with in parts of the state that I serve are now complaining that the only reason that part of the state is getting more attention (ie. Equal treatment to them rather than being neglected) is because I like to have lunch with my grandmother.
Models:
"tts_models/en/ljspeech/fast_pitch"
"vocoder_models/en/ljspeech/hifigan_v2"
@WeberJulian Can you check this?
I'm on it
Hey this looks like a bug I fixed in this PR https://github.com/coqui-ai/TTS/pull/1717
Could you please try v0.8.0 of TTS?
Yep that fixed it 👍
Describe 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
return ["".join(m.mark for m in puncs)]
AttributeError: '_punc_index' object has no attribute 'mark'
File "F:\TTS Adventures\coqui\coqui39\lib\site-packages\TTS\tts\utils\text\punctuation.py", line 140, in
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,
) 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
Additional context
No response