This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#7704 - Talk support for plugins
Attached to Project:
Rockbox
Opened by Mario Lang (mlang) - Monday, 03 September 2007, 20:24 GMT+2
Last edited by Alex Parker (BigBambi) - Sunday, 06 June 2010, 02:04 GMT+2
Opened by Mario Lang (mlang) - Monday, 03 September 2007, 20:24 GMT+2
Last edited by Alex Parker (BigBambi) - Sunday, 06 June 2010, 02:04 GMT+2
|
DetailsThis 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!!!!! |
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.
I found it pretty difficult to use chess box with the voice.
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.
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.
FS#7764Or should I move them to this patch?
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.
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.
FS#7933) which was originally part of this patch.No functional changes.
Just follow recent changes to plugin code sto make this patch apply again.