Stop button

7 views
Skip to first unread message

Dawid L.

unread,
Jul 25, 2010, 10:43:01 AM7/25/10
to open-sapi
Hi,

I've been using open-sapi for a while. Made a Python-Qt4 GUI and used
it under ubuntu. But I still don't know how to stop server from
talking in the middle of a sentence. Is there any way to do it? I
don't want to dig much into your work and I would like to say as much
end-user as possible (don't have much time).


Would appreciate any respons,
Dawid Laszuk

thomaslloyd

unread,
Jul 26, 2010, 6:43:08 AM7/26/10
to open-sapi
Hi David,

Great to hear your working on a bit of integration for open-sapi it is
a little bit of a shock to find out that someone is actually using it.
But that pleases me no end.

Currently if you are using the client to communication with the server
then but closing the client of killing the process will cause the
server to reset the current speech process.

In actual fact is watches when the socket closes, if you want i can
quickly implement a stop function that can be called from the client.

Let me know what you would prefer as both as easy. Thanks for the
great work and I look forward to seeing it work and a bit more of an
explanation about how you using it.

If you want then you can add it onto the google code page for people
to download, or a link to where your hosting the code?

Tom

Dawid L.

unread,
Jul 29, 2010, 5:58:22 PM7/29/10
to open-sapi

Thank you for replay :) Sorry for delay in response, but I'm currently
at holidays.


If you could, it would be great to have that 'stop' function callable
from outside. Well, mainly due to my lack of linux-user skills I can't
figure out how to shut process.

Python GUI, which I wrote, isn't very sophisticated. My goal was only
to click button or press key rather than type whole command into
terminal. I've done in about an hour (which should tell you about it's
complexity). Nevertheless, of course I can share it. I've put it onto
my google docs account. Here's link:
http://docs.google.com/leaf?id=0B2TX11t9b2gDZGRjZTcxMmMtMDlmOC00Y2NlLWJjODctNDQxNmZjYThhMzE4&hl=pl
, though if needed it can be placed anywhere you want.
To run it you'll have to have python and PyQt4 module. It read paste
text either by clicking on 'read' button or by pressing CTRL+SHIFT
+SPACE.
I was planning to add that "stop" button and somehow make it to
automatically find what voices are available and put their names into
spinBox, rather then just numbers.


How am I using it?
I've installed your open-sapi via wine, added my Ivona voices and run
it through terminal commands. Step-by-step of how I installed all can
be read on Polish Ubuntu Forum http://forum.ubuntu.pl/showthread.php?t=128480
. Please use Google Page Translation to translate it. I've checked
that English translation is not too bad.
In my GUI-script, there are two threads ( client and server ) and
they're just using linux command to talk to each other.

David

thomaslloyd

unread,
Jul 30, 2010, 7:57:18 AM7/30/10
to open-sapi
Right i will implement the STOP command as soon as I get some free
time.

To help fine out the voices list there are two ways to go about this
that spring to mind.

1. You can read the stdout output from the client process when run
with this command.
Command = ~/open-sapi/rockbox/client-server/rbutil-sapi-cli.tcl -e
Ouput on stdout =
297:0:Microsoft Mary:Female:English_United_States:Microsoft:Adult
297:1:Microsoft Mike:Male:English_United_States:Microsoft:Adult
297:2:Microsoft Sam:Male:English_United_States:Microsoft:Adult
297:3:VW Julie:Female:English_United_States:Voiceware:Adult
297:4:VW Kate:Female:English_United_States:Voiceware:Adult

297 = Voice List Entry : Name of Voice : Gender : Language :
Distributor : Age

Now if you do not have the skills yet to read the output from a
process you have run then I recommend trying this method.

Run the command once at startup:
~/open-sapi/rockbox/client-server/rbutil-sapi-cli.tcl -e > /tmp/
osapiv.list

This will add the list of voices as seen above into a file located in
your tmp directory called osapiv.list. You can then read this file
line by line and separate it by ":" to give you the data you want.
Then you can add this to the GUI in a suitable manner. You can also
add rate, pitch and volume to your GUI and send those commands to the
server.

Volume: 0 to 100
Rate: -10 to + 10
Pitch: -10 to + 10

I will check the latest SVN version for bugs in terms of running with
the server and client together and e-mail you as soon as i implement
the stop commend. It should only be 20 mins work. :) Then you can
download the latest svn version for your pleasure.

Little bits of work like this make for great projects in the end. A
little tools like this is a life saver for people with poor eyesight
having to read web pages all day. Don't think your work is not
appreciated as I thought that same as then someone like you comes
along and starts using it and helping out and it makes it all work
it.

Tom






On Jul 29, 10:58 pm, "Dawid L." <laszukda...@gmail.com> wrote:
> Thank you for replay :) Sorry for delay in response, but I'm currently
> at holidays.
>
> If you could, it would be great to have that 'stop' function callable
> from outside. Well, mainly due to my lack of linux-user skills I can't
> figure out how to shut process.
>
> Python GUI, which I wrote, isn't very sophisticated. My goal was only
> to click button or press key rather than type whole command into
> terminal. I've done in about an hour (which should tell you about it's
> complexity). Nevertheless, of course I can share it. I've put it onto
> my google docs account. Here's link:http://docs.google.com/leaf?id=0B2TX11t9b2gDZGRjZTcxMmMtMDlmOC00Y2NlL...
> , though if needed it can be placed anywhere you want.
> To run it you'll have to have python and PyQt4 module. It read paste
> text either by clicking on 'read' button or by pressing CTRL+SHIFT
> +SPACE.
> I was planning to add that "stop" button and somehow make it to
> automatically find what voices are available and put their names into
> spinBox, rather then just numbers.
>
> How am I using it?
> I've installed your open-sapi via wine, added my Ivona voices and run
> it through terminal commands. Step-by-step of how I installed all can
> be read on Polish Ubuntu Forumhttp://forum.ubuntu.pl/showthread.php?t=128480

Dawid L.

unread,
Jul 30, 2010, 5:46:47 PM7/30/10
to open-sapi
Actually, that command doesn't work for me properly. When I type it
and execute I get only Widows's basic voice (Sam) as output and then
long wait. It doesn't print out my additional Ivona's voices, though
I've waited for more than 10 minutes. Like the client couldn't get any
answer. But when I type client command, when server is on', with "-
p ?" I get every voice printed, only this time on server output. I'll
try to make pipes between client and server threads.

Volume and rate were already added, but no problem in putting also
pitch controller :)

thomaslloyd

unread,
Jul 30, 2010, 6:30:23 PM7/30/10
to open-sapi
Oh I think you might be using the original code as I made a branch
that I have been developing on for a long time now.

Can you post the commands your using and the directories the commands
are being executed from.

You might benefit from looking at the wiki again and getting the news
set of instructions from there. This will move you to the new version
that is more stable and will do what i am suggesting.

The never version will actually spawn the server from the client so
you no long need to run both. The server and the client actually talk
quite nicely now and you can have a two way communications for all the
information you want.

Tom

Dawid L.

unread,
Jul 31, 2010, 8:00:36 AM7/31/10
to open-sapi
I've read wiki, but don't know about what set of instructions you are
talking about. Well, I assume that you mean those from
"RockboxUtilityCommsSpec" and if so, then I don't really know where to
put them.

Once again I've downloaded source from svn (as read-only) and tried
that command you type before ( ~/open-sapi/rockbox/client-server/
rbutil-sapi-cli.tcl -e ). Nothing has changed. I still get only one
voice output and then long wait.

>albert@albert-laptop:~$ ~/tmp/open-sapi-read-only/open-sapi/rockbox/client-server/rbutil-sapi-cli.tcl -e
>297:0:Microsoft Mary:Female:English_United_States:Microsoft:Adult
(before i was writing from my head and I though it was Sam, not
Mary ;) )



Reply all
Reply to author
Forward
0 new messages