jasonppy / VoiceCraft

Zero-Shot Speech Editing and Text-to-Speech in the Wild
Other
7.64k stars 746 forks source link

Espeak not installed when loading models in Gradio_app #121

Closed JustPal1 closed 5 months ago

JustPal1 commented 6 months ago

I believe I've set up all required dependencies. Cuda is working, I've checked. Running gradio_app.py works fine, but when I click on the 'Load Models" button in the website, it pops up with the error: "RuntimeError: espeak not installed on your system". I do have espeak installed, downloaded from https://github.com/espeak-ng/espeak-ng/releases (tried both 32 and 64 bit versions). I've also tried the non-ng espeak from https://espeak.sourceforge.net/index.html Perhaps the issue here is not espeak but wget, since the error of "'wget' is not recognized as an internal or external command, operable program or batch file." also appears. I'm not sure which file causes this error either. But this is also a strange issue, as I DO have wget installed. If I use the wget (URL) command from the same cmd, it works just fine. I'm out of ideas on what is missing here. If anyone could help, I'd appreciate it.

Full console output:

python gradio_app.py [nltk_data] Downloading package punkt to [nltk_data] C:\Users\JustAPal\AppData\Roaming\nltk_data... [nltk_data] Package punkt is already up-to-date! Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). Lightning automatically upgraded your loaded checkpoint from v1.5.4 to v2.2.3. To apply the upgrade to your files permanently, run python -m pytorch_lightning.utilities.upgrade_checkpoint C:\Users\JustAPal\.cache\torch\whisperx-vad-segmentation.bin Model was trained with pyannote.audio 0.0.1, yours is 3.1.1. Bad things might happen unless you revert pyannote.audio to 0.x. Model was trained with torch 1.10.0+cu102, yours is 2.0.1. Bad things might happen unless you revert torch to 1.x. 'wget' is not recognized as an internal or external command, operable program or batch file. Traceback (most recent call last): File "C:\Users\JustAPal\AppData\Roaming\Python\Python311\site-packages\gradio\queueing.py", line 407, in call_prediction output = await route_utils.call_process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JustAPal\AppData\Roaming\Python\Python311\site-packages\gradio\route_utils.py", line 226, in call_process_api output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JustAPal\AppData\Roaming\Python\Python311\site-packages\gradio\blocks.py", line 1550, in process_api result = await self.call_function( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JustAPal\AppData\Roaming\Python\Python311\site-packages\gradio\blocks.py", line 1185, in call_function prediction = await anyio.to_thread.run_sync( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\Lib\site-packages\anyio\to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\Lib\site-packages\anyio_backends_asyncio.py", line 2134, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\Lib\site-packages\anyio_backends_asyncio.py", line 851, in run result = context.run(func, args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\JustAPal\AppData\Roaming\Python\Python311\site-packages\gradio\utils.py", line 662, in wrapper response = f(args, **kwargs) ^^^^^^^^^^^^^^^^^^ File "F:\ttsvoicecraft\src\audiocraft\gradio_app.py", line 121, in load_models "text_tokenizer": TextTokenizer(backend="espeak"), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "F:\ttsvoicecraft\src\audiocraft\data\tokenizer.py", line 49, in init phonemizer = EspeakBackend( ^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\Lib\site-packages\phonemizer\backend\espeak\espeak.py", line 46, in init super().init( File "C:\ProgramData\anaconda3\Lib\site-packages\phonemizer\backend\espeak\base.py", line 40, in init super().init( File "C:\ProgramData\anaconda3\Lib\site-packages\phonemizer\backend\base.py", line 78, in init raise RuntimeError( # pragma: nocover RuntimeError: espeak not installed on your system

johnwick123f commented 5 months ago

in console you have to run this command, i don't think you can use wget for installation(I might be mistaken)

apt-get install espeak-ng
JustPal1 commented 5 months ago

I am running windows, not linux, so apt-get does nothing for me. Still managed to solve this though. In wrapper.py I set the variable to be the absolute path to the library.

cls._ESPEAK_LIBRARY = "C:\Program Files\eSpeak NG\libespeak-ng.dll"