bootphon / phonemizer

Simple text to phones converter for multiple languages
https://bootphon.github.io/phonemizer/
GNU General Public License v3.0
1.23k stars 174 forks source link

Phoneme different from espeak-ng #174

Closed thewh1teagle closed 1 month ago

thewh1teagle commented 2 months ago

Describe the bug When creating phoneme from Hebrew it's different from espeak-ng

Phonemizer version 3.3.0

System macOS m1

To reproduce

"""
pip install phonemizer
cmake -B build . -DUSE_LIBPCAUDIO=ON -DBUILD_SHARED_LIBS=ON
cmake --build build
"""
import phonemizer
from phonemizer.backend.espeak.wrapper import EspeakWrapper
from pathlib import Path

lib_path = Path(__file__).parent / 'espeak-ng/build/src/libespeak-ng/libespeak-ng.dylib'
EspeakWrapper.set_library(lib_path)
phonemes = phonemizer.phonemize('שלום', language='he', backend='espeak', preserve_punctuation=True)
print(phonemes)
ʃalom
$ cd espeak-ng
$ cmake -B build . -DUSE_LIBPCAUDIO=ON
$ cmake --build build
$ ./build/src/espeak-ng -v he -x "שלום"
Sal'om

Expected behavior The phonemes should be identical

Additional context Add any other context about the problem here.

mmmaat commented 1 month ago

This is not a bug, using espeak-ng -v he --ipa -x "שלום" you replicate the phonemizer output.