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

espeak text to speech sounds very weird on ubuntu 20.04 LTS

I am bit new to linux and I tried to run this python code. At the first time it asked me to install libespeak-dev and try to run the code again. After installing it when I ran the code the sound was very weird and very robotic and it was terrible to…
1
vote
2 answers

Python text to speech not working using pyttsx3

import pyttsx3 engine=pyttsx3.init('dummy') engine.say('Hello') engine.runAndWait() While I am executing the following code, I am not getting any errors but I am not getting any voice from the system.Help me what I want to do.
Lokesh
  • 19
  • 2
1
vote
0 answers

In while loop speech_recognition sr.listen drasticly slows down

I have a problem that when I use SpeechRecognition library in python and when I want to put r.listen(source)in while loop my code drasticly slows down. import speech_recognition as sr import pyttsx3 as p import random from talk import * r =…
0
votes
0 answers

AttributeError: 'super' object has no attribute 'init' sys:1: UninitializedDeallocWarning: leaking an uninitialized object of type NSSpeechDriver

While creating an assistant and trying to convert audio to speech using pyttsx3, but everytime I run my program, I get the same error "AttributeError: 'super' object has no attribute 'init' sys:1: UninitializedDeallocWarning: leaking an…
AKD2022
  • 1
  • 1
0
votes
0 answers

I am trying to use python TTS with the import pyttsx3, and it is giving and error

I am trying to use python TTS with the import pyttsx3, and it is giving and error. Here is the error: Exception has occurred: ModuleNotFoundError No module named 'pyttsx3' File "C:\Users\Jacob\TTS.py", line 1, in import…
0
votes
0 answers

Pyttsx3 does not work if speakers are not connected

Had a need to use pyttsx3 on Windows Server 2016, Python version 3.11.1. If the speakers are not connected (via connection before virtual desktop), an error occurs: line 69, in save_to_file temp_stream = self._tts.AudioOutputStream …
Tiaranso
  • 1
  • 1
0
votes
0 answers

pyttsx3 - generate subtitles file

I have a long text file which I convert to audio file via pyttsx3 save_to_file method. I have no problem in that and it is working absolutely fine. What I am trying to do is generating a subtitle file of the audio file. I also tried to search for it…
0
votes
0 answers

pyttsx3 is spelling out words

I'm trying to take a dataframe : NeuroScience_df = pd.read_csv('ns_def_test.csv', delimiter='-') and run it thru a function that randomly iterates through the dataframe and prints out variables in each row while waiting for user input: def…
jricks72
  • 37
  • 6
0
votes
1 answer

how to Emphasize certain words in Text to Speech conversion using python

Hey I'm looking to emphasize certain words/phrases in a Text to Speech conversion project, But I couldn't find any open source library or API to do that. Can anyone suggest me any open source libraries or any other way to solve this issue. Thank…
0
votes
0 answers

pyttsx3 engine.runAndWait() causing problem

I was making personal assistant for myself but faced an error. def listen(): with sr.Microphone() as source: speak("Listening...") r.pause_threshold = 1 audio = r.listen(source) try: speak("Recognizing...") …
Ansh Tyagi
  • 116
  • 1
  • 15
0
votes
1 answer

How to save .mp3 from pyttsx3 to certain location?

def finalvoice(): engine = pyttsx3.init() raw_voice = Path("post_data.json").read_text() final_voice = json.loads(raw_voice.replace("post_body","")) voices = engine.getProperty('voices') engine.setProperty('voice',…
0
votes
0 answers

Class not registered. sapi5 pyttsx3 python error While creating a chatbot using python pyttsx3

I was creating a AI but after creating the voice output function The code worked but after 1 day i rerun this same code but this error is showing. Python AI Output Code import pyttsx3 def output(Text): engine = pyttsx3.init("sapi5") voices…
0
votes
0 answers

convert audio output to audio input

I wrote a program in python to convert text into sounds, but the sounds are only output to the speakers, and I need them to be heard in the game or in voice chats, that is, to be output to the voice I looked at many different options but none came…
Georg
  • 1
  • 1
0
votes
0 answers

How can I fix kernel problems with pyttsx3 in MAC?

enter image description hereI'm seeking your assistance with a problem I'm encountering while working with speech-to-text libraries, specifically gTTS and pyttsx3. The latter is giving me execution issues, and I'm unable to make the function work…
0
votes
0 answers

Python has stopped Working on using pyttsx3

I am just trying to a python module 'pyttsx3' and got this error "Python has Stopped Working". The code is all correct. Please anyone help me in fixing this..[enter image description here] (https://i.stack.imgur.com/Kk62k.png) I have tried…