TTS/tests/text_tests
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
..
__init__.py refactor and fix multi-speaker training in Trainer and Tacotron models 2021-06-28 17:03:19 +02:00
test_belarusian_phonemizer.py 🔥 XTTS implementation 2023-09-13 17:51:24 +02:00
test_characters.py Make style and lint 2022-03-02 13:25:35 +01:00
test_japanese_phonemizer.py Update Japanese phonemizer (#758) 2021-09-01 09:33:15 +02:00
test_korean_phonemizer.py Korean Phonemizer (#1822) 2022-09-08 12:06:07 +02:00
test_phonemizer.py Add BN tests 2023-04-17 13:37:10 +02:00
test_punctuation.py fix: correctly strip/restore initial punctuation (#3336) 2023-11-30 13:03:16 +01:00
test_text_cleaners.py reorg test files 2021-06-02 11:40:26 +02:00
test_tokenizer.py Fixup 2023-06-27 00:08:06 +02:00