Questions tagged [pyttsx3]

pyttsx3 is a text-to-speech conversion library in Python. Unlike alternative libraries, it works offline, and is compatible with both Python 2 and 3.

pyttssx3 is an offline text-to-speech library for Python. It supports multiple TTS engines, including Sapi5, nsss, and espeak.

251 questions
1
vote
0 answers

Python text to speech

import pyttsx3 engine = pyttsx3.init() engine.save_to_file('Hello World','test.mp3') engine.runAndWait() I used this link https://github.com/nateshmbhat/pyttsx3/tree/master/pyttsx3 to save…
YJS
  • 11
  • 2
1
vote
0 answers

How do you make pyttsx3 actually wait after saving to file?

I am working on a project involving pyttsx3 TTS, since I prefer my TTS to happen offline and not hit any API limits. Thus, I chose pyttsx3, since it lets me save to file (in principle). However, it seems that engine.init() engine.save_to_file(text,…
SkyeS
  • 11
  • 3
1
vote
1 answer

Pyttsx3 not working, process finished with exit code 0

I am making an Artificial Intelligence (AI) assistant and I wrote this to make it speak: engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') engine.setProperty('voices', voices[0].id) def speak(audio): engine.say(audio) …
Aryan GS
  • 39
  • 5
1
vote
2 answers

Are unofficial python binaries safe?

I was working a on python project in vscode in which I have need to install PyAudio but pip method isn't working so I found the method of unofficial python binaries for windows but I have a doubt are those binaries safe for my PC? Is that going to…
1
vote
0 answers

pyttsx3 can't run as root

I am getting a error while running a pttsx3 code as root. So the code should save a file and say the words inputted. Here is the code: import pyttsx3 engine = pyttsx3.init() s1 = input("Words: ") engine.say(s1) engine.save_to_file(s1…
BOBERT
  • 13
  • 4
1
vote
0 answers

Audio from tts doesn't play. But tts works when used without any other code. Anything wrong here?

import time as tm import pyttsx3 tts = pyttsx3.init() listener = speech.Recognizer() def bl(): if command.lower() == "hello": print("Bye lol") tts.say("Bye lol.") tts.runAndWait try: …
Ecstranaut
  • 11
  • 2
1
vote
1 answer

pyQt5 execution stops when using pyttsx3 even with Threading

Hi so essentially I'm writing an application that should provide a GUI along with speech recognition commands and the program should answer in TTS. I wrote a little test program because I wanted to learn threading with pyQt5 as it is needed to keep…
jokeriino
  • 11
  • 3
1
vote
0 answers

Runtime error occurs when using a thread for pyttsx3 audio function in a while loop

I am working on Vision-Based American Sign Language Converter Application using MediaPipe and OpenCV in python. As you may know, in webcam, we use a while loop for continuous hand detection of our hand. Now the problem was that when I added audio…
1
vote
1 answer

ImportError: Module 'pythoncom' isn't in frozen sys.path

I tries to convert my .py file to .exe which uses PYTTSX3 module through PyInstaller command and also imported hidden imports like pyttsx3.drivers, pyttsx3.drivers.sapi5. Command used: pyinstaller .\SCREENER.PY --hidden-import pyttsx3.drivers.sapi5…
1
vote
0 answers

Can I use the 'pyttsx3' module and 'speech_recognition' module in an apk of my android app?

Question - Can I use the 'pyttsx3' module and 'speech_recognition' module in an apk of my Android app? Are the 2 libraries compatible with Android? Actually, I am working on an AI with python, so for that I'll be needing these 2 libraries for the…
1
vote
1 answer

How to change language output with wikipedia package in python?

If i ask about iphone, the output is: "The iPhone is a line of smartphones designed and marketed by Apple Inc. that use Apple's iOS mobile operating system." But i want to change it into german. elif 'wikipedia' in query: speak('Suche…
akito01
  • 13
  • 3
1
vote
0 answers

voice acting of numbers in English in pyttsx3

I am writing a pastry shop with voice acting. Voice - installed in windows. Windows in Russian. Library - pyttsx3 I have a dictionary: {cake: description, cost, quantity} pastry = {'napoleon': [['butter', 'flour', 'sugar'], 7, 1000], …
nrameyka
  • 63
  • 7
1
vote
0 answers

unable to initialize pyttsx3 in heroku

I use pyttsx3 in heroku, but I can't initialize it in remote environment(heroku). I can do it in the local environment(Windows). How can I solve this problem? in log 2021-08-17T03:25:22.000000+00:00 app[api]: Build started by user…
misoshiru
  • 11
  • 3
1
vote
0 answers

Pyttsx3 cutting out some speech?

So I'm using the pyttsx3 method to convert some text into a file. My code is as such text = open('script.txt','r').read() engine = pyttsx3.init() engine.save_to_file(text,'audio.wav') engine.runAndWait() The file saves but it will randomly stop…
Ulto 4
  • 368
  • 4
  • 16
1
vote
1 answer

Sudden failure on pip install of pyttsx3 NameError: name 'platform_system' is not defined

I am unable to install pyttsx3 on windows , when i do pip install pyttsx3 I get the following errors kindly help me , note that I have already run the command pip --upgrade setuptools Exception: Traceback (most recent call last): File…