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

Not able to find phontab file, although it exists in virtual env. #196

Open
gauravdhiman opened this issue Jan 16, 2025 · 0 comments
Open

Comments

@gauravdhiman
Copy link

gauravdhiman commented Jan 16, 2025

Describe the bug
When I use kokoro-onnx package, that further uses phonemizer, I get below error from this line in phonemizer To debug, I printed print(f"data_path: {data_path}, ENV ESPEAK_DATA_PATH: {os.getenv('ESPEAK_DATA_PATH')}") just before the line, you can see its in output below.

❯ python test_tts.py
data_path: b'/Users/gauravdhiman/projects/python/ai/phidata-projects/social-media-agents/.venv-social-media-agents/lib/python3.12/site-packages/espeakng_loader/espeak-ng-data', ENV ESPEAK_DATA_PATH: None
Error processing file '/Users/runner/work/espeakng-loader/espeakng-loader/espeak-ng/_dynamic/share/espeak-ng-data/phontab': No such file or directory.

From whee is this /Users/runner/work/espeakng-loader/.... path coming ? There is no runner folder under Users folder on my machine. Is it hard-coded somewhere ?

kokoro-onnx version used: v0.2.9

Here is the test script:

"""
pip install kokoro-onnx soundfile

wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/kokoro-v0_19.onnx
wget https://github.com/thewh1teagle/kokoro-onnx/releases/download/model-files/voices.json
python test_tts.py
"""
import os
print(os.environ)
import soundfile as sf
from kokoro_onnx import Kokoro

kokoro = Kokoro("kokoro-v0_19.onnx", "voices.json")
charcters = [
    "af_bella"
]
for character in charcters:
    samples, sample_rate = kokoro.create(
        "Hello. This audio generated by kokoro!", voice=character, speed=1.0, lang="en-us"
    )
    sf.write(f"{character}_voice.wav", samples, sample_rate)
    print(f"Created {character}_voice.wav")
print("Created all voices")

Phonemizer version
phonemizer-fork v3.3.1

System
Macbook (iOS)

To reproduce
Shared above

Expected behavior
Should create the audio file in .wav format, but fails with error shared above (not able to find phontab file.

Additional context
Here is the ful tree of packages installed

output of uv pip tree

kokoro-onnx v0.2.9
├── colorlog v6.9.0
├── espeakng-loader v0.2.3
├── librosa v0.10.2.post1
│   ├── audioread v3.0.1
│   ├── decorator v5.1.1
│   ├── joblib v1.4.2
│   ├── lazy-loader v0.4
│   │   └── packaging v24.2
│   ├── msgpack v1.1.0
│   ├── numba v0.60.0
│   │   ├── llvmlite v0.43.0
│   │   └── numpy v2.0.2
│   ├── numpy v2.0.2
│   ├── pooch v1.8.2
│   │   ├── packaging v24.2
│   │   ├── platformdirs v4.3.6
│   │   └── requests v2.32.3
│   │       ├── certifi v2024.12.14
│   │       ├── charset-normalizer v3.4.1
│   │       ├── idna v3.10
│   │       └── urllib3 v2.3.0
│   ├── scikit-learn v1.6.1
│   │   ├── joblib v1.4.2
│   │   ├── numpy v2.0.2
│   │   ├── scipy v1.15.1
│   │   │   └── numpy v2.0.2
│   │   └── threadpoolctl v3.5.0
│   ├── scipy v1.15.1 (*)
│   ├── soundfile v0.13.0
│   │   ├── cffi v1.17.1
│   │   │   └── pycparser v2.22
│   │   └── numpy v2.0.2
│   ├── soxr v0.5.0.post1
│   │   └── numpy v2.0.2
│   └── typing-extensions v4.12.2
├── numba v0.60.0 (*)
├── onnxruntime v1.20.1
│   ├── coloredlogs v15.0.1
│   │   └── humanfriendly v10.0
│   ├── flatbuffers v24.12.23
│   ├── numpy v2.0.2
│   ├── packaging v24.2
│   ├── protobuf v5.29.3
│   └── sympy v1.13.3
│       └── mpmath v1.3.0
└── phonemizer-fork v3.3.1
    ├── attrs v24.3.0
    ├── dlinfo v1.2.1
    ├── joblib v1.4.2
    ├── segments v2.2.1
    │   ├── clldutils v3.21.0
    │   │   ├── attrs v24.3.0
    │   │   ├── colorlog v6.9.0
    │   │   ├── lxml v5.3.0
    │   │   ├── markdown v3.7
    │   │   ├── markupsafe v3.0.2
    │   │   ├── pylatexenc v2.10
    │   │   ├── python-dateutil v2.9.0.post0
    │   │   │   └── six v1.17.0
    │   │   └── tabulate v0.9.0
    │   ├── csvw v3.5.1
    │   │   ├── attrs v24.3.0
    │   │   ├── babel v2.16.0
    │   │   ├── colorama v0.4.6
    │   │   ├── isodate v0.7.2
    │   │   ├── jsonschema v4.23.0
    │   │   │   ├── attrs v24.3.0
    │   │   │   ├── jsonschema-specifications v2024.10.1
    │   │   │   │   └── referencing v0.35.1
    │   │   │   │       ├── attrs v24.3.0
    │   │   │   │       └── rpds-py v0.22.3
    │   │   │   ├── referencing v0.35.1 (*)
    │   │   │   └── rpds-py v0.22.3
    │   │   ├── language-tags v1.2.0
    │   │   ├── python-dateutil v2.9.0.post0 (*)
    │   │   ├── rdflib v7.1.2
    │   │   │   └── pyparsing v3.2.1
    │   │   ├── requests v2.32.3 (*)
    │   │   ├── rfc3986 v1.5.0
    │   │   └── uritemplate v4.1.1
    │   └── regex v2024.11.6
    └── typing-extensions v4.12.2
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