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
2 answers

How to pause, resume and stop pyttsx3 from speaking?

Is there any way to pause , resume and stop pyttsx3 from speaking? I've tried many ways but I couldn't find a solution. Here's the code: from tkinter import * import pyttsx3 import threading root = Tk() def read(): engine.say(text.get(1.0 ,…
Lenovo 360
  • 569
  • 1
  • 7
  • 27
0
votes
1 answer

pyttsx3 saving to a byte object

I'm making a Discord bot in Python with discord.py, and I am implementing a tts command. Basically, I have a function that saves the audio data I get to a byte type variable, and then (for testing purposes) writes it to a file. This is the code: def…
0
votes
1 answer

Tkinter after method executing immediately in the below code

The voice should come after self.scr.mainloop() but it is giving immediately voice. The TKinter after method is executing immediately, then pausing for the 3 second time after execution. What am I doing wrong? The documentation says the function…
0
votes
1 answer

AttributeError: 'Engine' object has no attribute 'runandwait'

The program below is giving me an error. This is my program: import pyttsx3 as tts def speak(text): engine = tts.init("sapi5") engine.say(text) engine.runandwait() speak('Hello user this is a test message.') This is the error message…
0
votes
1 answer

I am able to make exe of my pyttsx3 file but i am unable to send my exe

I had worked to make A.I Base assistant and i was successful to make exe file but i am unable to send exe files to others as this error comes "missing pyttsx3 drivers ".I was successful to make it exe by writing this code in my spec file enter image…
0
votes
1 answer

How to make tts (pyttsx3) speak something after loading the Tkinter window

So I am making a project which has numerous buttons and windows using Tkinter and I implemented tts using pyttsx3 module. Consider the following example: import pyttsx3 from Tkinter import * #configure text-to-speech engine = pyttsx3.init() def…
luciferchase
  • 559
  • 1
  • 10
  • 24
0
votes
2 answers

how to stop pyttsx3 in middle of speech?

I want to stop pyttsx3. I tried killing multiprocess but then the response time gets slow I dont know why. Here is the code: import pyttsx3 from multiprocessing import Process def speakfunc(audio): engine = pyttsx3.init() voices =…
Prashasth Nair
  • 167
  • 2
  • 12
0
votes
2 answers

Changing order of execution in python

I have recently started programming and written a fairly simple program. But stuck at a point. My program does a very simple thing that when you click a button it will say a line and shows that text on the screen. But it is speaking the text first…
blaze2004
  • 287
  • 2
  • 11
0
votes
2 answers

Cannot initialize pyttsx3 engine in python

I have tried to initialize the engine for pyttsx3. Whenever the engine is to be initialized the below error appears. Traceback (most recent call last): File "C:\Users\Natarajan\lib\site-packages\pyttsx3\__init__.py", line 20, in init eng =…
Logadheep
  • 1
  • 2
0
votes
1 answer

I need assistance my Python Jarvis Assistant

With some help from youtube tutorials, I've been developing an assistant in python similar to that of Jarvis from the marvel movies. Every time I run the program I get the following Runtime Error: RuntimeError: The current Numpy installation…
0
votes
2 answers

pyttsx3 string to numeric values

so I am trying to convert a spoken alphanumeric string into useable variable. example is a spoken ip address. As an example: string(one nine two period one six eight period zero period one slash twenty four) turn this into 192.168.000.001/24 I…
0
votes
0 answers

Program automatically ending after if statement

I am creating a chess program and I'm creating a feature where if you are in check, a voice says 'check'. Here is my code (the main file, anyways): import pygame as p import ChessEngine import pyttsx3 WIDTH = HEIGHT = 512 DIMENSION = 8 SQ_SIZE =…
AG-88301
  • 127
  • 1
  • 10
0
votes
0 answers

Why some PDF file don't work in PyPdf2 library?

''' PDFFILE="" PDF_NAME="" def pdf_btnClicked(): global PDFFILE, PDF_NAME PathOfPDF = askopenfile() PDFFILE = PathOfPDF.name print(PDFFILE) if PDFFILE == "": return else: PDFLocation["text"] = PDFFILE …
0
votes
0 answers

Program stops using tkinter with pyttsx3, why?

I've been googling for almost a week now and I know there are similar questions, but none of them have an answer. So here is one more, which hopefully will lead to an answer. I wrote a small program for my kid where a word shows up, is pronounced…
Osman P.
  • 45
  • 7
0
votes
1 answer

Unable to use pyttsx3

I installed pyttsx3 with the pip install pyttsx3 command, then when I run this program an error comes up. The program : import pyttsx3 engine = pyttsx3.init() rate = engine.getProperty('rate') print (rate) engine.setProperty('rate', 125) volume =…
Noé
  • 320
  • 2
  • 14