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

Why does python pyttsx3 ignore my 3rd input?

I am trying to get pyttsx3 to say text, a variable, and then more text, but for some reason it ignores the 3rd input and moves on to the next line of text. Here is the code: elif "what is the weather" in query: replaced_temp =…
2
votes
0 answers

Error: aplay: main:831: audio open error: No such file or directory

I'm trying to run pyttsx3 on my codespace. But, it does not seem to be working I keep gettiong this error aplay: main:831: audio open error: No such file or directory I tried running pyttsx3 file on the vs code in my windows pc and it works fine. I…
Rylie
  • 19
  • 4
2
votes
2 answers

Exception has occurred: ModuleNotFoundError No module named 'win32api'

WHAT I'M DOING: I'm trying to run a simple tts program: import pyttsx3 *** engine = pyttsx3.init() engine.setProperty("rate", 178) engine.say("I am the text spoken after changing the speech rate.") engine.runAndWait() but I'm getting the following…
2
votes
1 answer

How to open wa.me link directly on Whastapp desktop application, rather than it redirecting to web (on PC)?

I am writing a Python script (3.10.2) which opens certain desktop applications via voice command using the pyttsx3 and speech_recognition modules. I thought of including Whatsapp into this script as well, and provided the wa.me chat link of one of…
kxnyshk
  • 167
  • 2
  • 9
2
votes
1 answer

Voice assistant in Python

I have my basic structure setup but wanted a suggestion. Once I call the assistant, it waits for queries but after that, it stops. Can it be made in such a way that after answering the first query, for example, opening YouTube, it waits for a second…
ritik
  • 21
  • 3
2
votes
1 answer

Combining Object Detection with Text to Speech Code

I am trying to write an object detection + text-to-speech code to detect objects and produce a voice output on the raspberry pi 4. However, as of right now, I am trying to write a simple python script that incorporates both elements into a single…
2
votes
0 answers

Error in using text to speech engine(NSSpeechSynthesizer on Mac OS) pyttsx3

I am doing a tutorial on voice-based assistant. But I keep getting error while compiling the code. I am using M1 mac. my code: import pyttsx3 engine = pyttsx3.init('nsss') engine.say('Hello sir, how may I help you, sir.') …
2
votes
3 answers

Not able to write files from PYTTSX3

I am doing Ai research. I have been using pyttsx3 for the voice. The pyttsx3 function does not produce visemes. It does produce limited timing for each word. I intend to make a function that take in the text, then produce the visemes for animation…
David Day
  • 21
  • 3
2
votes
1 answer

How to start an mp4 file in python speech recognizer?

I am creating a python voice assistant referring from a youtube tutorial. Unfortunately, the video creator has a windows os. So he uses startfile from OS module. But this is not working in ubuntu. Here is the code that the video maker used: elif…
Thilak S
  • 31
  • 1
  • 8
2
votes
1 answer

Using Mbrola voices with pyttsx3

I am currently trying to use pyttsx3 on an application. I have no issue on that but the client would like the application to be delivered with the voices which pyttsx3 doesn't do becauseit use the voices of the os. Our idea is therefore to use…
Loïc Dubois
  • 142
  • 9
2
votes
1 answer

Sapi5 on linux?

I am working on creating an AI for myself and I chose python as the programming language to code it in. I am an absolute beginner in programming and have very little knowledge of the subject. After spending months of coding I finally created an AI…
Anshul Ahuja
  • 21
  • 1
  • 2
2
votes
1 answer

program closes prematurly with pyttsx3

iv'e been trying to make a personnel assistant and i have been using pttsx3 with tkinter to talk to you but when i run the code it closes the programm immediately and i am wandering how to keep it open so i can ask multiple questions so i guess i am…
dekan
  • 21
  • 2
2
votes
1 answer

My pyttsx3 is not working properly as it doesn't give david voice

I want the Microsoft David Voice for my pyttsx3 module. I wrote the following code. With voices[0].id it is giving Zira (Female voice) and when I use voices[1].id it shows error list is out of index. Please help. How do I get David Voice? import…
1
vote
1 answer

Pyttsx3 voice tone and language configuration

I am using the pyttsx3 module for text-to-speech in for an ai python assistant, but I am not able to choose a male/female option for voices. I read the documentation given on https://pypi.org/project/pyttsx3/ where it says use…
maygon
  • 57
  • 18
1
vote
2 answers

How do I print the current word being utterred in pyttsx3

The official documentation for pyttsx3 gives a variation of the following example for printing words that are currently being said. The only difference is that the print statements are in Python 3.x syntax instead of Python 2.x. import pyttsx3 def…
Ninja_Soup
  • 51
  • 8
1
2
3
16 17