Python Forum
Know when the pyttsx3 engine stops talking
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Know when the pyttsx3 engine stops talking
#1
So I am having this issue, I recently discovered the pyttsx3 API and the documentation isn't really helping, the "isBusy" function doesn't seem to work very well, apparently it doesn't tell when the engine stops "talking". Does anyone have more experience with this API and can help me? Thank you.
Reply
#2
You can ask the author (Nathan M Bhat) email here: [email protected]
UsualCoder likes this post
Reply
#3
(Aug-29-2021, 07:25 PM)Larz60+ Wrote: You can ask the author (Nathan M Bhat) email here: [email protected]

Thank you for the information!
Reply
#4
If i test so do engine work as long the text given to it are,
if look at processes used so are there two these get shut down/cleaned when no more text.
Tell more what you have problem with.
Here code i did test with in a virtual environment.
import pyttsx3

engine = pyttsx3.init()
engine.say("I will speak this text" * 10)
print(engine.isBusy())
engine.runAndWait()

#--------------

import pyttsx3
import time

engine = pyttsx3.init()
words = ["here","are","some","test","words"]
engine.startLoop(False)
for w in words:
    time.sleep(1)
    engine.say(w)
    engine.iterate()
    print(w)
    while engine.isBusy(): # wait until finished talking
        time.sleep(.1)
engine.endLoop()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  pip stops waiting for python walker 6 1,044 Nov-28-2023, 06:55 PM
Last Post: walker
  [SOLVED] [Linux] Script in cron stops after first run in loop Winfried 2 923 Nov-16-2022, 07:58 PM
Last Post: Winfried
  Controlling text-to-speech pauses with pyttsx3 pmac1300 4 4,433 Mar-14-2022, 06:47 AM
Last Post: Coricoco_fr
  pyttsx3 cutting off last word Extra 3 2,882 Feb-28-2022, 11:20 PM
Last Post: BashBedlam
  pyttsx3 problem Tyrel 0 1,108 Feb-05-2022, 08:53 AM
Last Post: Tyrel
  Search Engine nman52 1 53,643 Dec-16-2020, 11:46 AM
Last Post: Larz60+
  working with pyttsx3 gr3yali3n 0 1,600 Nov-24-2020, 09:40 AM
Last Post: gr3yali3n
  IDLE stops responding upon saving tompi1 2 1,924 Oct-01-2020, 05:44 PM
Last Post: Larz60+
  Python timer script stops before should ozstar 3 2,212 May-04-2020, 12:55 AM
Last Post: ozstar
  Python stops without errors shahgourav 4 2,753 Feb-04-2020, 11:44 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020