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

espeak-ng compatibility issue on M3 chip with Phonemizer #201

Open
kqkqgithub opened this issue Feb 13, 2025 · 0 comments
Open

espeak-ng compatibility issue on M3 chip with Phonemizer #201

kqkqgithub opened this issue Feb 13, 2025 · 0 comments

Comments

@kqkqgithub
Copy link

Description:

I encountered an architecture compatibility issue when using Phonemizer with espeak-ng on a Mac with an Apple Silicon (ARM64) chip. The error message suggests that the espeak-ng library is not compatible with the architecture.

Error Message:

# filePath: /phonemizer/backend/espeak/api.py
espeak: CDLL = ctypes.cdll.LoadLibrary(str(library))
Error: tried: '/opt/homebrew/Cellar/espeak-ng/1.52.0/bin/espeak-ng' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/espeak-ng/1.52.0/bin/espeak-ng' (no such file), '/opt/homebrew/Cellar/espeak-ng/1.52.0/bin/espeak-ng' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

Environment:

  • Operating System: macOS 15.0.1 (24A348)
  • Mac Chip: Apple Silicon (Apple M3 Pro)
  • Python Version: Python 3.10.16
  • Phonemizer Version: phonemizer-3.3.0
  • espeak Version: /opt/homebrew/bin/espeak: Mach-O 64-bit executable arm64
  • espeak-ng Version: /opt/homebrew/bin/espeak-ng: Mach-O 64-bit executable arm64

Steps to Reproduce:

  1. Install espeak-ng using Homebrew on Apple Silicon:
    brew install espeak-ng
  2. Install Phonemizer using pip:
    pip install phonemizer
  3. Run a simple phonemization script in Python:
    from phonemizer import phonemize
    result = phonemize("Hello world!", language='en-us')
    print(result)

Expected Behavior:

Phonemizer should correctly load the espeak-ng library and perform phonemization without architecture-related errors.

Actual Behavior:

The espeak-ng library fails to load due to incompatible architecture, requiring x86_64 but having arm64.

Additional Information:

The issue seems to stem from a mismatch in the architecture between espeak-ng and the expected binary format. Running Rosetta 2 for emulation may not be ideal for performance-critical applications.

Possible Workaround:

Any recommendations or workarounds for ensuring compatibility with Apple Silicon would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant