[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Speech Dispatcher roadmap discussion.
From: |
Bohdan R . Rau |
Subject: |
Speech Dispatcher roadmap discussion. |
Date: |
Sun, 12 Oct 2014 13:29:40 +0200 |
W dniu 2014-10-09 13:50, Bohdan R. Rau napisa?(a):
> In fact, there is task for one
> person for two days (counting morning cafe and visit in pub). If
> needed, I can provide first version of Python extensions during
> weekend.
So I had a litte free time to play wity C/Python interface and I'd like
to check if I'm right... in fact, there was possible to write probably
complete interface in 10 hours :)
http://tts.polip.com/files/pyspeechd-0.0.0.tar.gz - you can check it.
Module requires ffcall library (as callback functions has no information
about calling connection - it was impossible to make them Connection
class methods). Works in both Python2 and Python3.
By the way - sme bugs (probably) in libspeechd:
1) spd_get_default_address returns structure containing garbage in
unused fields. It's of course not a bug, but unused pointers should
contains NULL.
2) I tested it on 0.7.1 (Ubuntu 12.04), 0.8 and 0.8.1 (Ubuntu 14.04):
I open connection in threaded mode. I provide callback for BEGIN event,
and I turn on event notification:
x=cspeechd.Connection(cspeechd.MODE_THREADED)
x.onbegin=some_function
x.notify_begin=True
Now if I try to play sound icon, and immediately call "say" - function
"say" will lock (on 0.7.1 every time, on higher version at second or
third call):
x.icon('capital')
x.say('hello') # will lock
But:
x.icon('capital')
time.sleep(1)
x.say('hello') # will work
What I noticed: as spd_sound_icon does not return message id, callback
is fired also at begin of sound_icon...
Try simple callback function:
def callback_function(connection,*args):
print args
You will see the effect...
So important question:
Should functions like spd_sound_icon, spd_char and spd_key also return
message id? I think it has sense...
3) On 0.7.1 program works properly, on 0.8 and 0.8.1 behaviour is
strange:
I provide callbacks for (in my test) begin, end and index mark
def my_callback(connection,msg,uid,what,mark):
print msg,what
x.onbegin = my_callback
x.onend = my_callback
x.onindex = my_callback
I turn off notification on begin and turn on notifications for end and
index
x.notify_begin = False
x.notify_end = True
x.notify_index = True
I try something like:
print x.say('test')
x.sleep(1)
print x.say('second test')
On 0.8 and 0.8.1 event is sometimes fired also on begin...
would someone confirm or it's only my imagination?
ethanak
--
http://milena.polip.com/ - Pa pa, Ivonko!
- Speech Dispatcher roadmap discussion., (continued)
- Speech Dispatcher roadmap discussion., Bohdan R . Rau, 2014/10/09
- Speech Dispatcher roadmap discussion., Luke Yelavich, 2014/10/09
- Speech Dispatcher roadmap discussion., Bohdan R . Rau, 2014/10/13
- Speech Dispatcher roadmap discussion., Trevor Saunders, 2014/10/14
- Speech Dispatcher roadmap discussion., Bohdan R . Rau, 2014/10/15
- Speech Dispatcher roadmap discussion., Trevor Saunders, 2014/10/15
- Speech Dispatcher roadmap discussion., Bohdan R . Rau, 2014/10/16
- Speech Dispatcher roadmap discussion., Luke Yelavich, 2014/10/15
- Speech Dispatcher roadmap discussion., Bohdan R . Rau, 2014/10/16
- Speech Dispatcher roadmap discussion., Luke Yelavich, 2014/10/21
Speech Dispatcher roadmap discussion.,
Bohdan R . Rau <=
Speech Dispatcher roadmap discussion., Trevor Saunders, 2014/10/09