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

[TTS]特殊的句子及标点导致报错 #2571

Closed
arashrun opened this issue Oct 22, 2022 · 1 comment · Fixed by #2683
Closed

[TTS]特殊的句子及标点导致报错 #2571

arashrun opened this issue Oct 22, 2022 · 1 comment · Fixed by #2683

Comments

@arashrun
Copy link

For support and discussions, please use our Discourse forums.

If you've found a bug then please create an issue with the following information:

Describe the bug
特殊句式导致报错

To Reproduce
报错句子:并且——说来会使他惭愧——是以庄重口气谈到的,

Expected behavior
正常生成

Screenshots

Loading model cost 0.382 seconds.
DEBUG 2022-10-22 17:58:41,857 __init__.py:164] Loading model cost 0.382 seconds.
Prefix dict has been built successfully.
DEBUG 2022-10-22 17:58:41,857 __init__.py:166] Prefix dict has been built successfully.
[并且——说来会使他惭愧——是以庄重口气谈到的,] not in g2pW dict,use g2pM
Traceback (most recent call last):
  File "C:\Users\ming\Desktop\1\2.py", line 28, in <module>
    tts(text=text, output="output.wav")
  File "c:\users\ming\envs\b-site\paddlespeech\paddlespeech\cli\utils.py", line 328, in _warpper
    return executor_func(self, *args, **kwargs)
  File "c:\users\ming\envs\b-site\paddlespeech\paddlespeech\cli\tts\infer.py", line 684, in __call__
    self.infer(text=text, lang=lang, am=am, spk_id=spk_id)
  File "C:\Users\ming\envs\b-site\lib\site-packages\decorator.py", line 232, in fun
    return caller(func, *(extras + args), **kw)
  File "C:\Users\ming\envs\b-site\lib\site-packages\paddle\fluid\dygraph\base.py", line 354, in _decorate_function
    return func(*args, **kwargs)
  File "c:\users\ming\envs\b-site\paddlespeech\paddlespeech\cli\tts\infer.py", line 445, in infer
    frontend_dict = run_frontend(
  File "c:\users\ming\envs\b-site\paddlespeech\paddlespeech\t2s\exps\syn_utils.py", line 195, in run_frontend
    input_ids = frontend.get_input_ids(
  File "c:\users\ming\envs\b-site\paddlespeech\paddlespeech\t2s\frontend\zh_frontend.py", line 517, in get_input_ids
    phonemes = self.get_phonemes(
  File "c:\users\ming\envs\b-site\paddlespeech\paddlespeech\t2s\frontend\zh_frontend.py", line 437, in get_phonemes
    phonemes = self._g2p(
  File "c:\users\ming\envs\b-site\paddlespeech\paddlespeech\t2s\frontend\zh_frontend.py", line 243, in _g2p
    sub_finals = self.tone_modifier.modified_tone(word, pos,
  File "c:\users\ming\envs\b-site\paddlespeech\paddlespeech\t2s\frontend\tone_sandhi.py", line 352, in modified_tone
    finals = self._neural_sandhi(word, pos, finals)
  File "c:\users\ming\envs\b-site\paddlespeech\paddlespeech\t2s\frontend\tone_sandhi.py", line 89, in _neural_sandhi
    finals[-1] = finals[-1][:-1] + "5"
IndexError: list index out of range
@yt605155624
Copy link
Collaborator

正则化时需要对 —— 这个特殊符号进行过滤,欢迎提交 pr 修复

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

Successfully merging a pull request may close this issue.

2 participants