Reputation: 65
I cannot get plyer.tts to work on Windows.
Installed:
plyer 1.3.0
python 3.6.5
Example:
>>> from plyer import tts
>>> tts.speak("Hello world!")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\plyer\facades\tts.py", line 30, in speak
self._speak(message=message)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\plyer\facades\tts.py", line 35, in _speak
raise NotImplementedError()
NotImplementedError
The documentation states that tts works on Windows and I remember getting it to work in the past on a different PC.
What could be the problem?
Upvotes: 1
Views: 1069
Reputation: 46
I had the same issue with a NotImplementedError()
. It means that the text-to-speech engine/software that it's looking for is not being found on the machine. Although plyer worked for me with the native tts on Mac OS X, on Windows you have to download tts software, as I guess plyer isn't set up to find the native one anymore, or it's not named the same as it used to be, if you say it worked in the past.
Fix it by downloading espeak from http://espeak.sourceforge.net. Install it and move the espeak.exe file somewhere python can find it. For me, the easiest thing was to move it to the top-level folder of the script I was trying to run.
Upvotes: 3