Questions tagged [pyttsx]

pyttsx is a Python package supporting common text-to-speech engines on Mac OS X, Windows, and Linux.

pyttsx is a package supporting common engines on Mac OS X, Windows, and Linux.

References:

186 questions
4
votes
1 answer

EOFError randomly appeared while using PYTTSX and my code now constantly throws this error? It worked fine hours before

I was using PYTTSX yesterday with no issues at all - it was acting exactly as expected and working fine. However, when I tried to run the exact same code not two hours later it threw this error: Traceback (most recent call last): File…
Ryan Werner
  • 177
  • 3
  • 5
  • 13
3
votes
1 answer

How to use muti-language in 'gTTS' for single input line?

I want to convert text to speech from a document where multiple languages are included. When I am trying to do the following code, I fetch problems to record each language clearly. How can I save such type mixer text-audio clearly? from gtts import…
Md. Rezwanul Haque
  • 2,882
  • 7
  • 28
  • 45
3
votes
1 answer

On Windows Server 2019, pyttsx3 called via cgi/Apache produces empty wav files

I have Apache2.4 running on a Windows Server 2019 VM. Apache is set up so I can use python in my cgi-bin scripts. I have a script that does #!C:/Python39/python.exe text = "This is some example text." engine =…
3
votes
1 answer

How to set up specific python version for virtual environment for python?

I am a newbie in python and I am trying to add a new environment for my project which runs fine on my current environment Python 3.7.5 After adding all the dependency I was facing an issue for pyttsx3 package(for python text to speech) on…
Anirudh Thakur
  • 101
  • 1
  • 1
  • 5
3
votes
1 answer

How to get pyttsx3 to read a line but not wait

I have a chatbot that I want to read with sound the responses to the user's inputs. However, pyttsx3 makes it so that the program waits for it to stop speakign with runAndWait(). This causes the user to type before the text is finished causing a…
James Huang
  • 848
  • 1
  • 7
  • 35
3
votes
3 answers

ModuleNotFoundError: No module named 'pyttsx3.drivers' (File Compiled with pyinstaller), but working fine as uncompiled

I compiled my program using pyinstaller, python file working fine when not compiled, but throwing the error when i compiled & tested it. This is the full error, I think this might be because of pyinstaller Traceback (most recent call last): File…
3
votes
1 answer

how to stop pyttsx3 speech whenever I want

I want pyttsx to read text from my clipboard, so I can copy a text, and then let the computer read it for me, it works excellent, except its really annoying I can't stop the text to speech as I please, I either have to stop the whole program and…
user11936230
3
votes
4 answers

Pyttsx3 not working with PyInstaller

I get this error from the exe generated by PyInstaller when using Pyttsx3. The code works fine in python. I've tried using other versions of PyInstaller and Pyttsx but it doesn't make a difference. I've also tried Py2exe which is also not working…
Scott
  • 31
  • 1
  • 3
3
votes
2 answers

Pyttsx "run" but without "wait"

I'm using pyttsx in my game, but I have encountered a problem - method runAndWait() causes it to stop for a brief period of time to say the queued text. It is a problem, because it messes up my time counting. Is it possible to say a text but without…
3
votes
1 answer

why am i getting a pyttsx3 error after converting to exe?

When I use this file running in python , it runs for an infinite amount of time, when I convert it into a executable using pyinstaller , it only runs for a blink of an eye , it runs and cuts off so fast i barely can see it. Can you give me an…
3
votes
3 answers

Pyttsx hangs in runAndWait() after speaking on OSX

I have recently look into using Pyttsx in Python 2.7 for a project I'm doing, but after it has finished speaking the program hangs and won't continue. Here is my code: import pyttsx engine = pyttsx.init() engine.say("Hello…
TechnoSwag
  • 385
  • 1
  • 4
  • 11
3
votes
3 answers

pyttsx and gTTS module errors

windows 10-64bit I'm trying to use some text-to-speech tool to read text from lines of .txt document, something like this: so with pyttsx: import pyttsx engine = pyttsx.init() engine.say('my voice') engine.runAndWait() I got this error:…
user6067640
2
votes
1 answer

How do I find the length of a sound generated by pyttsx3

I am making a program that needs the length of speech generated by pyttsx3 I did not find any way to do it using pyttsx3 so I am storing the speech in a file and then trying to use mutagen to get the audio info import pyttsx3 from mutagen.mp3 import…
Coder
  • 31
  • 4
2
votes
1 answer

Running pyttsx3 inside a game loop

I’m trying to use pyttsx3 in a game where speech is said in response to events within the game, however I can’t figure out how to execute speech commands without pausing the game loop until the audio finishes. Using runAndWait() is no good for this…
2
votes
1 answer

How to fix Visual Studio "AttributeError: 'Engine' object has no attribute 'getproperty'"

This is my code: import pyttsx3 engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') print(voices[0].id) engine.setProperty('voice',voices[0].id) def speak(audio): engine.say(audio) engine.runAndWait() if…
1
2
3
12 13