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

pyttsx3 prints the current word being uttered

i basically want the tts to talk while printing out what it is saying. i'v pretty much copied and pasted the pyttsx3 documentation to do this but it just would not work. import pyttsx3 def onStart(name): print ('starting', name) def onWord(name,…
sakir45
  • 11
  • 1
1
vote
1 answer

speech_recognition.UnknownValueError - Can someone explain this error to me

I wasn't very sure on what to title this question so I'm sorry if it's not understandable. This project that I've been working on is a Jarvis-related project (Python) recently and this is my error Traceback (most recent call last): File…
Night_Falcon_X
  • 181
  • 2
  • 14
1
vote
1 answer

How to add your own tts voices for pyttsx3 python

So I have made a personal voice assistant in Python and it speaks currently with Microsoft David. There are some prebuilt voices to microsoft and you can add some more from settings and speech settings but not your own. I have two text to speech…
Frosty Boi FN
  • 21
  • 1
  • 3
1
vote
0 answers

Pyttsx3 not compiling with Kivy

I want to use pyttsx3 in my Kivy Application. But when I compiled it with buildozer, the app starts and stops suddenly after showing the loading sign. Does Kivy have any special TTS module? How to fix this?
Anandakrishnan
  • 349
  • 5
  • 10
1
vote
1 answer

Pyttsx3 does not read text in other languages

When I try to read text with pyttsx3, it only reads the English text and it does not read any text which is in some other language. Here's my code: import pyttsx3 engine = pyttsx3.init() engine.say("'Hello world' in Chinese:…
Lenovo 360
  • 569
  • 1
  • 7
  • 27
1
vote
1 answer

str object has no attribute 'id' - pyttsx3

My code for my personal assistant: engine = pyttsx3.init('sapi5') voices = engine.getProperty('voice') engine.setProperty('voice', voices[0].id) # text to speech def speak(audio): engine.say(audio) print(audio) …
Samartha S
  • 11
  • 2
1
vote
0 answers

How can I install custom voices for pyttsx3 independent of the system the program is running on?

I'm using pyttsx3 for a project, and I want to use a custom voice that isn't present in the default voices pyttsx3 provide (I figured out how to change voices) The problem is everywhere I search all I get are problems about not being able to change…
Ramgos
  • 181
  • 1
  • 6
1
vote
1 answer

TypeError: listen() missing 1 required positional argument: 'source'

import pyttsx3 import speech_recognition as sr import datetime import wikipedia import webbrowser import random import os #Speakfunction BACKEND print("Initializing FRIDAY") engine = pyttsx3.init('sapi5') voices =…
SensaiSam
  • 21
  • 1
1
vote
4 answers

engine.runandWait() get stuck

My script just stop and get stuck after engine.runandWait()... If someone has any idea of how to make it continue I would appreciate ! It seems that the answer isn't in the script itself because I tried scripts that are super simple... I also tried…
1
vote
0 answers

ModuleNotFoundError: No module named 'pyttsx3.drivers.sapi5

Im trying to run this code but for some reason it gives me this error: File "main.py", line 35, in engine = pyttsx3.init() File "pyttsx3\__init__.py", line 22, in init File "pyttsx3\engine.py", line 30, in __init__ File…
1
vote
1 answer

pyttsx3 say nothing

I am making a virtual assistant with python. I used pyttsx3 for talk to me. I wrote pyttsx3 initialisation in oops way. But when I run this code it says nothing. Here is my code. import pyttsx3 class Speaker: def __init__(self): …
Ethan Rodrigo
  • 315
  • 1
  • 8
1
vote
0 answers

OSError [Errno -9988] Stream closed in Python

I am using pyttsx3 and speech_recognition modules and sometimes I receive this error: OSError [Errno -9988] Stream closed. Here is a little bit same question, but without answer and on Raspberry Pi. My OS - Windows 10, Python version - 3.8.5 Minimal…
user14023416
1
vote
1 answer

pyttsx3 Module Error in Python 3.8. How to download pyttsx3?

I was trying to create a text to speech project in vs code but can't because pyttsx3 was not working as I was using python 3.8.5 Code -:> import pyttsx3 Text= pyttsx3.init() speech = input("Say Something : ") Text.say(speech) Text.runAndWait() I…
1
vote
1 answer

engine.say() and engine.runAndWait() not working while using them with thread in Pyttsx3

I am creating a voice assistant that can speak and hear (using Python). While I was adding the speaking feature I programmed it to greet while the programme starts. I was multithreading the programme because the speak functions take to much time, it…
Manbir Judge
  • 113
  • 1
  • 13
1
vote
0 answers

running function pyttsx3 text to speech causing application to close

I am running text to speech function each time an Italian word is being inserted into a listbox. Sometimes python script fails, after pronouncing all the words. Sometimes after pronouncing all the words all the insertions into listbox are done and…
LetzerWille
  • 5,355
  • 4
  • 23
  • 26