Rockbox

Tasklist

FS#7704 - Talk support for plugins

Attached to Project: Rockbox
Opened by Mario Lang (mlang) - Monday, 03 September 2007, 18:24 GMT
Last edited by Alex Parker (BigBambi) - Sunday, 06 June 2010, 00:04 GMT
Task Type Patches
Category Applications
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch does two things: It exports the talk functions
to plugins (through plugin.h) and changes genlang to create
a separate header (lang_enum.h) for only the string enums so
that these can be used in a plugin to feed talk_id() without
having to link lang.o.
It also changes chessbox.c to make basic voice support available.
You can navigate the board, get pieces announced, and get the opponent move announced.
So with a little practice, you can play chess blind on the rockbox!!!!!
This task depends upon

View Dependency Graph

This task blocks these from closing
 FS#7705 - Add speech to battery bench 
Closed by  Alex Parker (BigBambi)
Sunday, 06 June 2010, 00:04 GMT
Reason for closing:  Out of Date
Comment by Daniel Dalton (ddalton) - Monday, 03 September 2007, 22:16 GMT
I haven't tried this out yet. But does it add all the strings to english.lang? If so won't the voice become to big? Because once it is working well that is all I can see stopping it getting committed. Maybe there should be a separate voice file for plugins?
Comment by Daniel Dalton (ddalton) - Tuesday, 04 September 2007, 09:37 GMT
Very nice patch!
I have got it working.
Also I have now got voice for battery bench. Thanks to this patch.
But I really think we just need a voice file for plugins. Maybe if this gets committed you can just download the voice file so if your player doesn't support the large voice file it won't be a problem.
Comment by Daniel Dalton (ddalton) - Tuesday, 04 September 2007, 11:40 GMT
This patch just removes the Chess box stuff. So it just contains all the stuff needed to voice other plugins.
I found it pretty difficult to use chess box with the voice.
Comment by Mario Lang (mlang) - Tuesday, 04 September 2007, 19:42 GMT
If we want separate voice files for each plugin, how are we going to reuse
voice snippets that are already available in the core? It doesnt seem like very effective to
re-generate these for each plugin. For instance, the chessbox voice feature
uses 16 snippets from the core, and only adds (right now) 8 snippets (the piece colours and names).
One other problem I see with splitting this up for each plugin is the fact that
voice feedback for menus is hardcoded in the core (menu.c). So if a plugin uses the menu api,
the menu code will have a hard time to figure out which voice file to actually use.
Comment by Daniel Dalton (ddalton) - Tuesday, 04 September 2007, 22:01 GMT
Ok I see what your saying. Do you have any other ideas? I just think if we use english.voice for everything it is going to get too big. Maybe a voice file called plugin.voice? And then we could just add the strings we need? But I don't know.

Also is it ok that I removed the chess box part from your patch? Maybe you could put this in another task. But I thought it would be good if people just want to have some plugins talking they don't need the chessbox stuff.
Comment by Daniel Dalton (ddalton) - Saturday, 06 October 2007, 08:46 GMT
Update.
Comment by Daniel Dalton (ddalton) - Saturday, 06 October 2007, 08:47 GMT
Should the voicing of plugin error messages. (From the core) be kept in
 FS#7764 
Or should I move them to this patch?
Comment by Mario Lang (mlang) - Tuesday, 09 October 2007, 15:54 GMT
This is an update of the plugin-talk.diff without the chessbox modifications.
With this patch plugins can simply use IDs from the core language file for splash screens and menus.
This can come handy even without further bloating the language files, especially for things like yes/no questions or any other sort of thing that might want to reuse a core language ID.
To describe the idea behind the patch a little more: lang_enum.h is split out to contain only the enum for the language IDs.
This header is included in lang.h and in plugin.h (if plugin.h has PLUGIN defined).
Furthermore, the plugin api struct is modified to include the talk_* functions.
We recently have seen talk_{disable,enable}_menus() added to SVN (for the benefit of mpegplayer), so I took the opportunity to merge these functions into a logical order...
This patch has been in use by me (and several friends) for over a month now, and it has proofen stable.
A patch to voice-enable chessbox is going to be added in a different task.
Comment by Mario Lang (mlang) - Wednesday, 10 October 2007, 09:41 GMT
An update (without functional changes) to account for recent changes to plugin.{c,h} in svn.
Comment by Mario Lang (mlang) - Wednesday, 10 October 2007, 14:19 GMT
As mentioned in my previous comment, some core language IDs could as well be reused in plugin code.
This patch now changes most struct opt_item definitions in plguins that currently have a -1 voice_id (or wrongly set to NULL).
This makes many value selection menus in plugins voice enabled without adding anything further to the language file, we just set the correct voice_id values in struct opt_item.
For full accessibility of the menus inside plugins changes to the language file (or a plugin specific lang file) would be needed to avoid bloating the core. This will go in a different task.
This patch also fixed a "off-by-one" in the fireworks plugin (autofire_delay_settings mentions 300ms item twice) that I spotted when adding the correct voice_id.
Comment by Mario Lang (mlang) - Sunday, 14 October 2007, 08:52 GMT
Update to follow recent changes to plugin.h in SVN and account for the fix to fireworks.c ( FS#7933 ) which was originally part of this patch.
No functional changes.
Comment by Mario Lang (mlang) - Monday, 15 October 2007, 13:35 GMT
Yet another update with no functional changes.
Just follow recent changes to plugin code sto make this patch apply again.
Comment by harry tu (bookshare) - Tuesday, 23 October 2007, 20:46 GMT
needs resync
Comment by harry tu (bookshare) - Saturday, 24 November 2007, 16:08 GMT
Needs a huge resync. It won't even work.
Comment by alex wallis (alexwallis646) - Monday, 14 January 2008, 04:37 GMT
Hi. could this please be updated? Personally i don't care if i have a monster sized voice file well not unless it means the speech doesn't work very well.
Comment by harry tu (bookshare) - Sunday, 16 March 2008, 03:47 GMT
This needs a r e s y n c!
Comment by Jonathan Gordon (jdgordon) - Sunday, 16 March 2008, 05:10 GMT
then get off your ass and do it! youve been told before on numerous occasions to not ask for a sync
Comment by alex wallis (alexwallis646) - Sunday, 16 March 2008, 12:54 GMT
Hi. I have been in contact with theoriginal creator of this patch, and he has stated to me, that due to the fact that this patch is unlikely to be committed due to the attitude of the devs and the fact it needs resyncing quite a bit he won't be updating it on the tracker any more, though he did invite anyone who felt like it to go ahead and resync it. He also said to me that to get plugins talking you'd probably have to do modifications to individual plugins, as all this does is give access to the speech to the right API. Just another thought as well, although I am blind at the moment there really isn't a lot someone who is blind could do with most of the plugins, as most of them are graphical and from our point of view not very useful. The only ones off the top of my head I think we could use would be battery bench or chess. Although I could see a lot of potential with plugins, even if they were not talking for lots of different types of card games, they if made correctly would be useable with speech.
Comment by alex wallis (alexwallis646) - Sunday, 16 March 2008, 12:59 GMT
One other plugin we could use with speech is sudoku, and I as much as the next man would be keen to have talking plugins, and i'd be very happy if a solution was implemented, I wasn't trying to discourage anyone from getting speech working in a state that could be committed.
Comment by harry tu (bookshare) - Sunday, 16 March 2008, 16:23 GMT
Hi, I am blind as well and my feeling is we should have accese to the apps and some of the games (the ones we could play).

Loading...