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
1
vote
1 answer

How can I use the pyttsx3 library to save to a file?

I want to convert text to speech offline using pyttsx3 and I want to save the output to an audio file. I have seen this question and the first answer would be exactly what I need. I just couldn't get it to function. When running this: import…
Zegevlier
  • 63
  • 1
  • 7
1
vote
0 answers

ALSA - Cannot obtain info for CTL elem

I'm trying to add text to speech to the AI that i'm currently building using pyttsx and portaudio and I cannot get the thing to speak I've installed pyttsx3, portaudio, gtts, espeak and it just returns the below error. I've had a look at this…
OscarT
  • 19
  • 5
1
vote
1 answer

Object has no attribute error using library pyttsx3

I have written a demo project for voice recognition bot. But I am facing some error which shows that the object has no attribute. I have attached the code below def speak(audio): print('Computer: ' + audio) engine.say(audio) …
1
vote
1 answer

Python - TypeError: listen() missing 1 required positional argument: 'self'

I have been working on an AI in PyCharm but and I have seem to have encountered an error with speech_recognition trying to call a method to try to get audio input: /Users/waynedeng/Desktop/AI/venv/bin/python…
Ign1s Shotta
  • 87
  • 4
  • 14
1
vote
3 answers

Python - NameError: name 'engine' is not defined / Driver not found

I have been trying to work on an AI Project in PyCharm using this video: https://www.youtube.com/watch?time_continue=179&v=rU_ppVsyJu8 Here is the code: import sys print(sys.path) import speech_recognition as sr import pyttsx3 try: engine =…
Ign1s Shotta
  • 87
  • 4
  • 14
1
vote
0 answers

Why does my code provide an error when I try getting it to speak what it recognized?

I'm experimenting with speech on Python3, I'm very new with python and I have scoured all of the internet to understand what's wrong with my code, when I run the code I get the error you can see below. Please help me understand what's happening…
Eren Ucar
  • 33
  • 6
1
vote
1 answer

I am getting a "member not found" error with pyttsx3 in python

I am using Visual Studio 2017 and creating a Python application. I am getting a "member not found" error with pyttsx3 in python. The method gets called successfully the first few times, then the error gets called, and I am unable to call the method…
IllyShaieb
  • 111
  • 2
  • 8
1
vote
1 answer

Pyttsx text to speech - ModuleNotFoundError: No module named 'engine'

I am using Python3.7 on Win10. I would like to use Pyttsx but it shows an error. Do you have any idea how to fix the issue? Error: Traceback (most recent call last): File "C:\Python37\myTest\test.py", line 2, in import pyttsx …
Kobayashi
  • 25
  • 6
1
vote
2 answers

pyttsx3 not working on freshly installed windows 10

I have freshly installed windows 10 and I am trying to run the following code. import pyttsx3; engine = pyttsx3.init(); engine.say("I will speak this text"); engine.runAndWait() ; This use to work on my previous windows 10 installation but now it…
Ayush Aggarwal
  • 177
  • 3
  • 12
1
vote
1 answer

pyttsx error: No module named 'engine'

when i write this code: import pyttsx engine = pyttsx.init() engine.say('hello world ') engine.runAndWait() i get this probleme File "C:/Users/youssef123/PycharmProjects/fgq/ghqsd.py", line 1, in import pyttsx File…
yous sef
  • 11
  • 2
1
vote
0 answers

Alternatives to Pyttsx for TTS?

I have tried using Pyttsx for Text-To-Speech with Python 3 in the past. However, the voice sounds very crude and isn't as life-like as other Text-To-Speech services such as Google Assistant. Are there any other ready out-of-the-box Text-To-Speech…
Tiskolin
  • 167
  • 17
1
vote
1 answer

Loading message in Python 2.7?

I am making a personal assistant in Python 2.7 using the modules 'wikipedia', 'wolframalpha' and 'pyttsx3'. I am making so that the user can ask a question and the computer will then search Wikipedia and Wolfram and speak the answer using Pyttsx.…
Alex Hawking
  • 1,125
  • 5
  • 19
  • 35
1
vote
1 answer

Any ideas about how to save the sound produced by runAndWait()?

I'm using pyttsx3 to convert text to speech. import pyttsx3 def tts(text): engine = pyttsx3.init() engine.say(text) engine.runAndWait() but the problem is that I can't save the sound to a file (which is so weird for a library like…
zguesmi
  • 321
  • 1
  • 11
1
vote
0 answers

No voice output using pyttsx in tkinter after cx_freeze

I am using pyttsx to convert text to audio which works fine before compiling with cx_freeze. But after it gets converted to exe, there is no sound output. Even it produces no error. My setup file is following: . . . executables =…
Harshita
  • 183
  • 1
  • 10
1
vote
2 answers

Can't import pyttsx in Python 2.7 on Ubuntu Linux 16

I'm trying to use pyttsx on Ubuntu Linux (64 bit, PC) with Python 2.7. I've successfully used pip to install the package $sudo -H pip install pyttsx $pip list ... pyttsx (1.1) ... When I try to import it the import call fails $ python Python 2.7.12…
Joel
  • 2,230
  • 1
  • 20
  • 28