rhasspy / piper-phonemize

C++ library for converting text to phonemes for Piper
MIT License
84 stars 71 forks source link

Huge thanks for your efforts & question #10

Open ph0enixph0enix opened 1 year ago

ph0enixph0enix commented 1 year ago

First of all: A huge thanks from my side for all your efforts. This project is desperately needed! <3 I'm sitting on a Windows 10 64 bit machine and can't get Piper TTS to run just because of the phonemizer not able to instal via pip:

pip install piper-phonemize~=1.1.0 ERROR: Could not find a version that satisfies the requirement piper-phonemize~=1.1.0 (from versions: none) ERROR: No matching distribution found for piper-phonemize~=1.1.0

As far as I've seen from your commit history, you've been working on it (which is great!). I would help if I would have the knowledge to do so.

My question: It is not ready to use on Windows right now, am I right? If there is a way (even with caveats) please let me know how I can get to run on my machine...

raivisdejus commented 10 months ago

pip encodes some package information in their file names, so if the relevant part of the file name does not match your system it will not install it. I was able to work around this issue on an older computer the following way:

  1. Install any package and pay attention to the downloaded file names as those will be supported on your system.

    $ pip install piper-tts
    Collecting piper-tts
    Using cached piper_tts-1.2.0-py3-none-any.whl.metadata (776 bytes)

    Note the py3-none-any part of the filename.

  2. Download a release file, like piper_phonemize-1.1.0-cp310-cp310-manylinux_2_28_x86_64.whl and change the cp310-cp310-manylinux_2_28_x86_64 part in the file name to what you noted earlier.

  3. Use pip install and pass the new file to it.

This worked for me. Most likely there is a better more proper solution.

eusthace811 commented 8 months ago

pip encodes some package information in their file names, so if the relevant part of the file name does not match your system it will not install it. I was able to work around this issue on an older computer the following way:

  1. Install any package and pay attention to the downloaded file names as those will be supported on your system.
$ pip install piper-tts
Collecting piper-tts
  Using cached piper_tts-1.2.0-py3-none-any.whl.metadata (776 bytes)

Note the py3-none-any part of the filename.

  1. Download a release file, like piper_phonemize-1.1.0-cp310-cp310-manylinux_2_28_x86_64.whl and change the cp310-cp310-manylinux_2_28_x86_64 part in the file name to what you noted earlier.
  2. Use pip install and pass the new file to it.

This worked for me. Most likely there is a better more proper solution.

Thanks for this, I could install the packages now. Yet, I still can't get to run the piper http server.

''' pip install "piper-tts==1.2.0" --no-cache-dir --force-reinstall --no-deps pip install onnxruntime-gpu flask pip install "piper_phonemize-1.1.0-py3-none-any.whl" --no-cache-dir --force-reinstall --no-deps '''

''' Traceback (most recent call last): File "", line 189, in _run_module_as_main File "", line 112, in _get_module_details File "C:\Users...\Projects\piper\src\python_run\piper__init.py", line 1, in from .voice import PiperVoice File "C:\Users...\Projects\piper\src\python_run\piper\voice.py", line 10, in from piper_phonemize import phonemize_codepoints, phonemize_espeak, tashkeel_run File "C:\Users...\Projects\piper\env\Lib\site-packages\piper_phonemize\init__.py", line 6, in from piper_phonemize_cpp import ( ModuleNotFoundError: No module named 'piper_phonemize_cpp' '''

DrBill37 commented 7 months ago

I have the exact same error attempting to run piper after installing the renamed wheel on Windows, unable to import 'piper_phonemize_cpp': No module named 'piper_phonemize_cpp'

It appears that setup.py is not finding the external modules:

ext_modules = [ Pybind11Extension( "piper_phonemize_cpp", [ "src/python.cpp", "src/phonemize.cpp", "src/phoneme_ids.cpp", "src/tashkeel.cpp", ], define_macros=[("VERSION_INFO", version)], include_dirs=[str(_ESPEAK_DIR / "include"), str(_ONNXRUNTIME_DIR / "include")], library_dirs=[str(_ESPEAK_DIR / "lib"), str(_ONNXRUNTIME_DIR / "lib")], libraries=["espeak-ng", "onnxruntime"], ),

DoS007 commented 6 months ago

pip install piper-tts gives me ERROR: No matching distribution found for piper-phonemize~=1.1.0

colafly commented 3 months ago

not sure if it is still helpful, but the problem for me was because pybind11 is not installed, once i got that and also update espeak-ng location to correct path, i can run piper-phonemize without problem