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

Voice assistant not getting terminated

Hello I am currently making a voice assistant and I want to terminate it but it isnt getting termintating and just getting repeated elif 'you can sleep now' in query or 'take rest' in query: speak('ohk master I am going…
0
votes
1 answer

Python multiprocessing Process cant pickle pyttsx3.init()

Im currently working on a TTS application with multiprocessing and pyttsx3. If i try to start a process and pass the pyttsx3.init("sapi5") object as an argument in order to use it to speak in the target function it returns a TypeError because of…
0
votes
1 answer

Python module, pyttsx3 not recognised in VS code or pycharm

I am trying to make a bot that responds to certain question asked like ‘what is the time’ . I am trying to use pyttsx3 module to make it work but this error is coming: Traceback (most recent call last): File "/Users/HarAd…
Hardyk Mahendru
  • 320
  • 3
  • 11
0
votes
1 answer

How to use OpenCV with pyttsx3

I am trying to make a project to detect face mask using OpenCV, HaarCascade and Pyttsx3. The flow of the project is when mouth is not detected on a face then it should speak "face mask detected" else it should say "please wear face mask". The…
0
votes
1 answer

Speech recognition shows Error In Python (Positional Argument Error)

Python gives a error when I run this code and I've checked it number of times. The source here is the Microphone, but yet it keeps on asking a value for the 'source'. What should I do. What parameter should I pass to the 'source'? import…
Vishal Ram
  • 69
  • 7
0
votes
1 answer

How to make pyttsx3 stop talking in real-time video capturing in python

The code below shows the face and produces an output using voices. The problem is I'm unable to stop the voices, I want it to say it only once not for each frame taken P.S I've tried using a timer but it didn't work. import cv2 import…
0
votes
2 answers

I get import error after importing pyttsx3

I've been making simple "voice assistant". I imported pyttx3 using pip install pyttx3(and yes i added import pyttsx3 in the code), which successfully installed due to terminal outprint Successfully installed pyttsx3-2.90 but then when i try to run…
Tian
  • 11
  • 2
0
votes
1 answer

Unable to change voice in pyttsx3

I checked out a similar question but it still couldn't solve my issue. I wanted to put a female voice or just change the pitch of it. Few people suggested to change the voice id, further referring that 0 defined male voice while 1 defined…
0
votes
1 answer

Python Unbound error in return statement of a function

I am trying to build an Ai assistant similar to Alexa from this tutorial https://www.youtube.com/watch?v=AWvsXxDtEkU... So, I was getting this error and I can't seem to debug it: line 31, in take_command : return command : UnboundLocalError: local…
Saumya
  • 5
  • 2
0
votes
0 answers

Text to speech sapi5 python 3.8.6

Whenever I try to run my text to speech program in python 3.8.6 it gives me error My Code import pyttsx3 engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') print(voices[0].id) print(voices) engine.setProperty('voices',…
Prathamesh Bhatkar
  • 291
  • 1
  • 4
  • 15
0
votes
0 answers

ValueError: unsupported format character 'D' (0x44) at index 59

This is my code. amazon = 'https://www.amazon.in/s/ref=nb_sb_noss_1?url=search-alias%3Daps&field-keywords=%s' prime = 'https://www.primevideo.com/search/ref=atv_nb_sr?phrase=%s&ie=UTF8' if 'amazon' in query: speak('What product shall I search…
0
votes
1 answer

Error coming in this CreateObject from com types?

Well here is my Simple Code: from comtypes.client import CreateObject engine = CreateObject("SAPI.SpVoice") #stream = CreateObject("SAPI.SpFileStream") And this much errors comes. Traceback (most recent call last): File…
0
votes
0 answers

I am making a virtual assisstant and i get an error - ImportError: No system module 'pywintypes' (pywintypes39.dll)

I am making a Virtual Assistant and I am using the module pyttsx3 with sapi5. My code - engine = pyttsx3.init('sapi5') voices = engine.getProperty('voices') engine.setProperty('voice', voices[1].id) It gives an error - …
CoderMan
  • 43
  • 6
0
votes
1 answer

Errors while running speech_recognition module

I'm working on a project which uses the speech_recognition module. # Importing all the installed packages import speech_recognition as sr audio = sr.Recognizer try: with sr.Microphone() as source: voice =…
user15024711
0
votes
0 answers

How can I acquire the internal source code for specific Python module methods using VScode?

TLDR: What I want to acquire is the source code for pyttsx3.Engine.proxy._driver.say, in order to modify its source code to save the converted audio file instead of speaking it, but unfortunately, this was it. Is there any way to acquire these kinds…
lucidcloud
  • 73
  • 6