Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed 'started-word' event and fixed stop function #295

Closed
wants to merge 1 commit into from

Conversation

Barakri
Copy link

@Barakri Barakri commented Nov 18, 2023

No description provided.

@willwade
Copy link
Collaborator

willwade commented May 3, 2024

NB: This gives different output from #186

e.g for #186

starting None
word None 1 0
word None 0 3
word None 4 5
word None 10 5
word None 16 3
word None 20 6
word None 27 4
word None 32 3
word None 36 4
word None 41 3
finishing None True

and this PR

starting None
word None 2560 3
word None 5120 5
word None 12320 5
word None 20320 3
word None 29120 6
word None 35536 4
word None 41876 3
word None 44570 4
word None 54336 3
finishing None True

import pyttsx3
import logging

def onStart(name):
   print('starting', name)
def onWord(name, location, length):
   print('word', name, location, length)
def onEnd(name, completed):
   print('finishing', name, completed)
engine = pyttsx3.init()
engine.connect('started-utterance', onStart)
engine.connect('started-word', onWord)
engine.connect('finished-utterance', onEnd)
engine.say('The quick brown fox jumped over the lazy dog.')
engine.runAndWait()

@nateshmbhat
Copy link
Owner

@willwade is this PR still relevant ? i think this might already be fixed as part of other fixes that recently went in.

@willwade
Copy link
Collaborator

Yep. You are right. Close this one b

@nateshmbhat
Copy link
Owner

Yep. You are right. Close this one b

Thanks 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants