-
Notifications
You must be signed in to change notification settings - Fork 196
Description
Describe the bug
When I use phonemizer on my python webapp while pointing at my local version of espeak-ng (1.52.0), it outputs phonemes that are not compatible with espeak-ng
Example
Phonemizer version
phonemizer==3.3.0
System
Mac OSX M1 Ventura 13.0 - Python 3.12.2
To reproduce
I'll use the word afternoon as an example - I'll also show my code at the bottom:
the phonemizer package produces these phonemes: ɑːftənuːn
The espeak-ng CLI produces these ones: ,aaft3n'u:n
I want to be able to use espeak-ng or the IPA chart with sounds to be able to pronounce each of these phonemes. I can't do this with the output from the phonemizer package as some of the phonemes aren't recognised by espeak-ng CLI tool and they're not available on the IPA dictionary either (e.g ɑː)
Another example - for the word 'care':
phonemizer output: keə
espeak-ng output: k'e@
Code:
from phonemizer.separator import Separator
from phonemizer.backend.espeak.wrapper import EspeakWrapper
from phonemizer.backend import EspeakBackend
_ESPEAK_LIBRARY = '/opt/homebrew/Cellar/espeak-ng/1.52.0/lib/libespeak-ng.dylib' #use the Path to the library.
EspeakWrapper.set_library(_ESPEAK_LIBRARY)
backend = EspeakBackend(language)
phenomized = backend.phonemize(['afternoon'], separator=Separator(phone='-', word='', syllable=None))
I'm wondering if it's something to do with text encodings?