When I run pip install espeak
, I get Could not find a version that satisfies the requirement espeak (from versions: )
. Anyone know how to fix this issue?
Installing espeak using pip in Python 3.6
20k Views Asked by Mailer Daemon At
3
There are 3 best solutions below
0

Assuming you are after python-espeak, and are running Debian/Ubuntu, you likely want sudo apt-get install python-espeak
. However, it is quite old and doesn't seem to support python3
.
I'd recommend simply executing espeak directly using the subprocess module, like so:
#!/usr/bin/env python3
import subprocess
def espeak(text: str, pitch: int=50) -> int:
""" Use espeak to convert text to speech. """
return subprocess.run(['espeak', f'-p {pitch}', text]).returncode
0

I had the same problem in the context of using coqui-ai. For me what worked was to install espeak like this: brew install espeak
. This discussion helped: https://github.com/coqui-ai/TTS/discussions/1973 .
As suggested in a comment,
espeak
is not a Python package available on PyPI.Perhaps you meant one of these:
If none of these packages are the one you need, you can take a look at the list here: https://pypi.org/search/?q=espeak