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
0
votes
0 answers

pyttsx3 forced allineament during text to speech genaration

I'm tryng to create a video creation bot, using Python, pyttsx3 and moviepy. I'm having some trouble with forced allineament( matching audio and the text of the audio shown on video). I would like to make the forced allineament during the…
0
votes
0 answers

pyttsx3 closing window tkinter

I'm using the pyttsx3 module. When I run the program after the voice finishes speaking, the window closes automatically. I've been searching the internet, but I haven't found an answer yet. Some people are having this problem as well, however, they…
David 04
  • 37
  • 5
0
votes
0 answers

How to fix this error in Pyttsx3: KeyError: 'VoiceAge'

I installed Pyttsx3 with mamba on Mac OS. All was working fine. Then I upgraded to Mac OS Ventura 13.01 and I get an error on this minimal working example: import pyttsx3 engine = pyttsx3.init() engine.getProperty('voices') The third line throws an…
fiacobelli
  • 1,960
  • 5
  • 24
  • 31
0
votes
1 answer

How to make voice detection in python faster?

I have some voice detection code and it works! but, it runs really slowly. Can I do anything to make it faster? import speech_recognition import pyttsx3 recognizer = speech_recognition.Recognizer() while True: try: with…
user20292485
0
votes
0 answers

Pyttsx crashing GUI

So I have been testing pyttsx3 but when I try to bind it with a key such as below, It says works once then crashes the GUI. Any idea how to solve this ? I have tired it with PyQt5 and same result. your help is really appreciated, Thank you. This is…
Attiq Rahman
  • 173
  • 1
  • 6
0
votes
0 answers

how to make object detection with voice feedback where the voice is saying the object name just once without repeating

I'm making an object detection using Opencv and yolo and voice feedback that can say any object seen by the camera using pyttsx3 library , the problem is that when there is an object in the frame like "person " it keep saying person without stopping…
0
votes
0 answers

Trouble using 'pyttsx3' and 'espeak' although both are installed

I get OSError: libespeak.so.1: cannot open shared object file: No such file or directory However when I run $ espeak --version I get eSpeak text-to-speech: 1.48.03 04.Mar.14 Data at:…
GrayJou
  • 1
  • 1
0
votes
0 answers

Pyttsx3 best property for female voice

I need to create the most "realistic" sounding voice for a project using pyttx3. What should the property values be? Rate?
Vito Vekic
  • 1
  • 1
  • 2
0
votes
1 answer

How to get Python pyttsx3 to read a csv file without the speech saying "backslash n"

import csv import pyttsx3 engine = pyttsx3.init() with open('file.csv', 'r', encoding='utf8') as csv_file: csv_reader = csv.reader(csv_file) next(csv_reader) for line in csv_reader: title = line[1] text = line[5] …
0
votes
0 answers

import error of comtypes in linux whil using pyttsx3 module

I am having an issue in the pyttsx3 module while using it in linux(raspberrian).When I use the module it gives an error in the following line:engine = pyttsx3.init('sapi5') the error is: self._module = importlib.import_module(name) File…
user19239425
0
votes
1 answer

Running pyttsx3 (espeak) text-to-speech in docker container creates awful sound quality

I am trying to run pyttsx3 (which runs on espeak) and create .mp3 files with it in python3.10. The problem is that the created audio files have truly inaudible sound quality as can be seen/heard here: https://vocaroo.com/15u2rs6hOJXR This problem…
Sokker
  • 110
  • 15
0
votes
1 answer

TypeError: speechtxt() takes 0 positional arguments but 1 was given

I am writing code for voice recognition I am run the program, I am getting TypeError problem. This is my code: import pyttsx3 import pyaudio import speech_recognition as sr import webbrowser import datetime import pyjokes ​ def sptext(): …
user20017494
0
votes
1 answer

ModuleNotFound: No module named 'pyttsx3'

I tried importing pyttsx3 module on my vscode but it kept on showing me error as ModuleNotFoundError: No module named 'pyttsx3'.I had installed it on my terminal but still the error exists.
0
votes
0 answers

OSError: libespeak.so.1: cannot open shared object file: No such file or directory (PyCharm problem)

I have a problem with library "pyttsx3". I think the main problem is with PyCharm, because espeak work fine from terminal and same code, that not work in PyCharm, work in Jupter Notebook. I don't have an idea, what can I do more. import…
JohnLocke
  • 29
  • 4
0
votes
0 answers

Pause and resume audio in pyttsx3

I am building a pdf reader and it works just fine. But, I can't pause it. If it starts talking in never stops until the entire text is read. So, how can I pause and resume (or even stop) the audio whenever I want? Here is my code: import…
Chandler Bong
  • 461
  • 1
  • 3
  • 18