2014-02-13, 02:39
Hello,
I have good and also bad news.
The good news is that I no longer have to poll for the current control and I can avoid hammering json interface over http. I have implemented the approach outlined in my previous post (edits 7 and 8). It's currently divided into two add-ons in order to be able to make it also running on linux. Currently I have only tested it on Windows. Each of these add-ons is only a few lines of code.
The first add-on only provides interface to a TTS engine. To make it really simple I am just sending text string to NVDA screen reader on Windows.
The second addon parses its arguments, if an argument named action is found it uses Action built-in function to execute that action also waiting for that action to finish. Finally that addon calls that JSON API query I have posted in my previous message parsing the output and sending that for text to speech to the first add-on.
Then to make it work I have to install modified keymap to my user profile which replaces actions that should trigger the speaking.
For example I have just bound left, right, up and down arrow keys so after moving inside a menu or list I will get spoken feetback.
The bad news is that there is most likelly nothing more I can do. in order to inprove the access. There is no way on how to retrieve states of the controls for example I can't retrieve if a check control is selected. There is no way on how to speak content of notifications. There is no way on howto access and / or get feetback about the text while typing into an edit field. There is no way on how to retrieve the text for reading for example while reading add-on changelogs and other info. There is no way to retrieve info labels as they are displayed. The only way around that would be to write seperate info labels presentation bound to this add-on specific keyboard controls.
As a prototype this is hopefully a good attempt but still it is verry limited. Imagine it provides similar level of access we had back in the days to devices running Android 1.6.
I can see in the XBMC 13 version there is going to be support for JSON notifications using python. Ideally we would need a lot of notifications added to make all this usefull. For example focus change when arrowing inside a menu or inside a list. Window activate while opening new wiews or new folders. Text added and text inserted notifications while typing into edit fields. And also it would be helpfull to be able to access other control properties with xbmcgui not just the base class properties so we might be able to make the flat representation of the current window and provide access to the control states such as selected, disabled and maybe others. Maybe this can be rethough so it won't be needed if the proposed notifications can provide enough usefull information. I think this would be quite a lot of new notifications what might however confuse other developers I am afraid.
I haven't yet looked into the XBMC source code I have only read python API docs and JSON API docs. I am not verry experienced programmer maybe it's why.
I would be happy to receive hints and / or corrections and ideas on how to proceed if someone else is interested.
I might be able to post what I have so far with a bit of description stating how to set it up the way it works over here if someone wishes to play with this.
Thanks and greetings
Peter
I have good and also bad news.
The good news is that I no longer have to poll for the current control and I can avoid hammering json interface over http. I have implemented the approach outlined in my previous post (edits 7 and 8). It's currently divided into two add-ons in order to be able to make it also running on linux. Currently I have only tested it on Windows. Each of these add-ons is only a few lines of code.
The first add-on only provides interface to a TTS engine. To make it really simple I am just sending text string to NVDA screen reader on Windows.
The second addon parses its arguments, if an argument named action is found it uses Action built-in function to execute that action also waiting for that action to finish. Finally that addon calls that JSON API query I have posted in my previous message parsing the output and sending that for text to speech to the first add-on.
Then to make it work I have to install modified keymap to my user profile which replaces actions that should trigger the speaking.
For example I have just bound left, right, up and down arrow keys so after moving inside a menu or list I will get spoken feetback.
The bad news is that there is most likelly nothing more I can do. in order to inprove the access. There is no way on how to retrieve states of the controls for example I can't retrieve if a check control is selected. There is no way on how to speak content of notifications. There is no way on howto access and / or get feetback about the text while typing into an edit field. There is no way on how to retrieve the text for reading for example while reading add-on changelogs and other info. There is no way to retrieve info labels as they are displayed. The only way around that would be to write seperate info labels presentation bound to this add-on specific keyboard controls.
As a prototype this is hopefully a good attempt but still it is verry limited. Imagine it provides similar level of access we had back in the days to devices running Android 1.6.
I can see in the XBMC 13 version there is going to be support for JSON notifications using python. Ideally we would need a lot of notifications added to make all this usefull. For example focus change when arrowing inside a menu or inside a list. Window activate while opening new wiews or new folders. Text added and text inserted notifications while typing into edit fields. And also it would be helpfull to be able to access other control properties with xbmcgui not just the base class properties so we might be able to make the flat representation of the current window and provide access to the control states such as selected, disabled and maybe others. Maybe this can be rethough so it won't be needed if the proposed notifications can provide enough usefull information. I think this would be quite a lot of new notifications what might however confuse other developers I am afraid.
I haven't yet looked into the XBMC source code I have only read python API docs and JSON API docs. I am not verry experienced programmer maybe it's why.
I would be happy to receive hints and / or corrections and ideas on how to proceed if someone else is interested.
I might be able to post what I have so far with a bit of description stating how to set it up the way it works over here if someone wishes to play with this.
Thanks and greetings
Peter