coqui-tts/TTS/tts/utils/text
Enno Hermann 39321d02be
fix: correctly strip/restore initial punctuation (#3336)
* refactor(punctuation): remove orphan code for handling lone punctuation

The case of lone punctuation is already handled at the top of restore(). The
removed if statement would never be called and would in fact raise an
AttributeError because the _punc_index named tuple doesn't have the attribute
`mark`.

* refactor(punctuation): remove unused argument

* fix(punctuation): correctly handle initial punctuation

Stripping and restoring initial punctuation didn't work correctly because the
string-splitting caused an additional empty string to be inserted in the text
list (because `".A".split(".")` => `["", "A"]`). Now, an initial empty string is
skipped and relevant test cases are added.

Fixes #3333
2023-11-30 13:03:16 +01:00
..
bangla Make lint 2023-04-17 15:02:56 +02:00
belarusian 🔥 XTTS implementation 2023-09-13 17:51:24 +02:00
chinese_mandarin Create language folders under `TTS.tts.utils.text` 2022-02-25 09:32:54 +01:00
english Create `text/english` folder 2022-02-25 09:32:54 +01:00
french Create language folders under `TTS.tts.utils.text` 2022-02-25 09:32:54 +01:00
japanese Fix Tortoise load (#2791) 2023-07-24 13:42:47 +02:00
korean Prevent installing mecab-ko (#1967) 2022-09-14 10:28:07 +02:00
phonemizers fix: don't pass quotes to espeak (#3286) 2023-11-24 12:25:37 +01:00
__init__.py Remove OLD TOKENIZATION ROUTINES 2022-02-25 09:32:54 +01:00
characters.py Port Fairseq TTS models (#2628) 2023-06-05 11:15:13 +02:00
cleaners.py Fix DelightfulTTS (#2823) 2023-07-31 13:52:45 +02:00
cmudict.py reformatting and styling 2021-04-12 11:47:39 +02:00
punctuation.py fix: correctly strip/restore initial punctuation (#3336) 2023-11-30 13:03:16 +01:00
tokenizer.py Port Fairseq TTS models (#2628) 2023-06-05 11:15:13 +02:00