Open agkphysics opened 2 years ago
Hi, actually with preserve_punctuation=True
another bug occurs:
from phonemizer import phonemize
print(phonemize([".", "."], language="en-us", backend="festival", preserve_punctuation=True))
print(phonemize([".", "."], language="en-us", backend="espeak", preserve_punctuation=True))
print(phonemize([".", "."], language="mb-us1", backend="espeak-mbrola", preserve_punctuation=True))
Yields
['..']
['..']
['', '']
But should be (espeak-mbrola
does not support punctuation)
['.', '.']
['.', '.']
['', '']
Describe the bug When using the default
preserve_punctuation=False
, the Festival backend ignores text that only contains punctuation, whereas the Espeak backend returns the empty string.Phonemizer version
System Ubuntu 20.04.4 Linux kernel 5.15.0 Python 3.8.10
To reproduce
Yields output
Expected behavior Should output: