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

How do I make pyttsx3 not give me an (libespeak.os not found) error in repl.it

When I run my program in replit.com: import gspread import pyttsx3 gc = gspread.service_account(filename='credentials.json') sh = gc.open_by_key('1rdccFZmL3nI8gV2_dfw-fKDGjK3RtQG3D4JqDWAdWIg') worksheet = sh.worksheet('temp') cell_value =…
0
votes
0 answers

How to handle multithreading for pyttsx3 library?

I am using pyttsx3 library to convert text to speech. I am using Flask rest API to implement the application Problem I am able to serve only one request for text to speech operation at a time But I wanted to understand how can I do it for multiple…
Sangram Badi
  • 4,054
  • 9
  • 45
  • 78
0
votes
0 answers

How to change voice id in pyttsx3 (I have voice id 2)

How do I change the voice id here? I tried to change it but it stays Microsoft DAVID voice. import pyttsx3 engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') engine.setProperty('voices', voices [2].id) engine.setProperty('rate',…
0
votes
0 answers

How can I use pico or festival with pyttsx3?

I want to use pico or festival as engine in pyttsx3 (on an Ubuntu machine), but when I write something like '''engine = pyttsx3.init('pico')''' it tells me that there is no module named pyttsx3.drivers.pico. However I have installed both: ii …
MDoe
  • 163
  • 1
  • 13
0
votes
0 answers

How Can I Find The Length Of Text To Speech Generated By pyttsx3 Without Generating The mp3 File?

I'm trying to make a bot to generate videos with text to speech, but I need to know the duration of text the text to speech without already generating it. I'm using a speaking rate of 175, and the engine.getProperty('voices')[0]: male voice. I've…
0
votes
0 answers

Pyttsx3 not running

I'm trying to use the pyttsx3 library but once i run the code it shows an error This is the code: import pyttsx3 text = input("Text >> ") engine = pyttsx3.init() engine.say(text) engine.runAndWait() and this the error message: ALSA lib…
0
votes
0 answers

Python pyttsx3 has no sounds

I use pyttsx3 to generate voices, but there is no sound when running, here is my code: import pyttsx3 as tts e = tts.init(driverName="espeak") e.say("hello") e.runAndWait() And I try to print the voices list, finding that the list is empty: voices…
0
votes
1 answer

How to save the output of pyttsx3 to a temporary file?

I am able to store the TTS output to a file using the following code import pyttsx3 engine = pyttsx3.init() engine.save_to_file('Hello World!', 'hello.mp3') engine.runAndWait() Is it is possible to store this to a temporary file instead for an…
InsertCheesyLine
  • 1,112
  • 2
  • 11
  • 19
0
votes
0 answers

can i control what pyttxs3 and speech_recognition takes as input?

Okay so I tried using pyttxs3 and speech_recognition in a noisy area and my code took a lot of time to run, i assume that it was constantly taking the noise as input. So i was wondering if it is possible to give a timer, for example if it is more…
0
votes
0 answers

While using pyttsx3, when i tried to change voice between David and Zira It was speaking in David voice only

import pyttsx3 engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') engine.setProperty('voices',voices[1].id) def speak(a): engine.say(a) engine.runAndWait() speak('Hello Bro, How are you?') #After restarting my pc also didn't affect…
0
votes
0 answers

How do I implement gTTs instead of pyttsx3 in my program?

I want to use gTTs instead of pyttsx3 as the tts engine in my program. Is it possible? Because pyttsx3 only has English language but I want to use my tts engine for filipino language, as a result, it is difficult for the tts engine to pronounce…
0
votes
0 answers

Trying to change the voice of desktop assistant but it's not working

what could be the reason for that message ?It happend when i tried to change assistant voice. I tried on macbook Traceback (most recent call last): File "/Users/rahuldatta/Documents/Assistance/Hjarvis.py", line 6, in voices =…
0
votes
0 answers

Can't get imports that are seen in "pip list"to be recognized in pycharm

I'm trying to get pyttsx3 to work in pycharm. I did a "pip3 install pyttsx3". "pip3 list" shows it to be available. I get the following when I try to run the module in pycharm: from pywiktionary import WiktionaryParserFactory ModuleNotFoundError:…
Jim
  • 1
  • 1
0
votes
1 answer

i am unable to use my extension in my program

i just completed making an copy of jarvis from iron man for my project but i have encountered some issues with it I am unable to use it whenever I use it It shows import pyttsx3 could not be resolved I tried reinstalling it but still I encountered …
0
votes
1 answer

pyttsx3 wait to finish?

im using pyttsx3 for my telegram bot. i have this code. def TTSBot(message): print("TTS") Engine.save_to_file(message.text, "Voice.mp3") Engine.runAndWait() FBot.send_audio(message.chat.id, open("Voice.mp3", "rb"),…
amiroof
  • 31
  • 3