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

Disparity between backends with punctuation #137

Open
agkphysics opened this issue Sep 7, 2022 · 1 comment
Open

Disparity between backends with punctuation #137

agkphysics opened this issue Sep 7, 2022 · 1 comment
Labels

Comments

@agkphysics
Copy link

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

phonemizer-3.2.1
available backends: espeak-ng-1.50, espeak-mbrola, festival-2.5.0, segments-2.2.1

System
Ubuntu 20.04.4
Linux kernel 5.15.0
Python 3.8.10

To reproduce

from phonemizer import phonemize

print(phonemize([".", "."], language="en-us", backend="festival"))
print(phonemize([".", "."], language="en-us", backend="espeak"))
print(phonemize([".", "."], language="mb-us1", backend="espeak-mbrola"))

Yields output

[]
['', '']
['', '']

Expected behavior
Should output:

['', '']
['', '']
['', '']
@mmmaat mmmaat changed the title Disparity between backends with preserve_punctuation=False Disparity between backends with punctuation Nov 25, 2022
@mmmaat mmmaat removed the festival label Nov 25, 2022
@mmmaat
Copy link
Collaborator

mmmaat commented Nov 25, 2022

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)

['.', '.']
['.', '.']
['', '']

@mmmaat mmmaat closed this as completed Nov 25, 2022
@mmmaat mmmaat reopened this Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants