KoljaB / RealtimeTTS

Converts text to speech in realtime
1.78k stars 159 forks source link

Dependencies missing after "pip install RealtimeTTS" (Windows 11, VSCode, py_10.11) #44

Open scubadriver opened 7 months ago

scubadriver commented 7 months ago

Dependencies missing after "pip install RealtimeTTS"

(Windows 11, VSCode, py_10.11) almost fresh VSCode (only torch, numpy). Resolved manually as described below:

Simple test code:

from RealtimeTTS import TextToAudioStream, SystemEngine TextToAudioStream(SystemEngine()).feed(dummy_generator()).play()

Got an error:

(.venv) C:\dev_free\w1>python th_cuda.py C:\dev_free\w1.venv\lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) ... C:\dev_free\w1.venv\lib\site-packages\pydub\utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning) WARNING:root:engine system failed to synthesize sentence "This is a sentence." with error: [WinError 2] The system cannot find the file specified Traceback: Traceback (most recent call last): File "C:\dev_free\w1.venv\lib\site-packages\RealtimeTTS\text_to_stream.py", line 279, in synthesize_worker success = self.engine.synthesize(sentence)

--------------------------------------------

installed the ffmpeg/ffprobe

pip install ffmpeg pip install ffprobe

did not help

google gave:

https://stackoverflow.com/questions/74651215/couldnt-find-ffmpeg-or-avconv-python

ffmpeg-downloader package:

pip install ffmpeg-downloader

did not help

ffdl install --add-path

did not help

--> restart VSCode (as after all previous steps)

now it worked!

KoljaB commented 7 months ago

Thanks a lot. I'll add ffmpeg to the dependencies.