speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with "end" callback in Python


From: James Simmons
Subject: Problems with "end" callback in Python
Date: Tue, 22 Apr 2008 16:36:23 -0500

Lukas,

Thanks for sending me your code.  It works as advertised.  HOWEVER, I 
was unable to get the technique to work with my own program (which is 
attached).  As Hynek has discovered, there are conflicts between the 
pygtk event dispatcher and the thread used by speech-dispatcher.  If I 
try to let the event loop run at the same time as speech dispatcher's 
thread none of the callbacks are received.  If I do a wait loop after 
initiating speech, ALL of the callbacks are received, but it does no 
good because the highlighting of my text in the GTK control is not made 
visible until *after* the text is finished.  As you can see I've tried 
to let the gtk pending events be processed from within the loop but 
nothing happens.  Only the final word actually gets highlighted.

So it looks like for now the only thing that works is my 
one-word-at-a-time approach, as bad as that is.

James Simmons


Lukas Loehrer wrote:

>Hi James,
>
>I attached an example that shows how to use SSML mark elements with
>speech-dispatcher and the espeak output module. Unfortunately, the
>presence of marks influence the way the speech sounds. This seems to
>be a speech-dispatcher issue, because when using espeak directly, the
>marks do not influence the speech. Also, I had to turn on the
>SSML_MODE setting manually.
>
>Actually, espeak itself supports reporting of word boundries, but I do
>not know if there are python bindings for espeak. The nvda
>screen-reader for Windows uses espeak from python, thus it might be
>possible to benefit from their work when for creating python bindings for
>espeak.
>
>Best regards, Lukas
>  
>

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: speechtest.txt
Url: 
http://lists.freebsoft.org/pipermail/speechd/attachments/20080422/2d0ce6d7/attachment.txt
 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ReadEtextsActivity.py
Url: 
http://lists.freebsoft.org/pipermail/speechd/attachments/20080422/2d0ce6d7/attachment-0001.txt
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]