• 1
  • 3
  • 4
  • 5
  • 6(current)
  • 7
[Linux] kodivc - a program for controlling Kodi with simple voice commands
#76
Your idea itself is just fine, yet this would be problematic given that I am not aware of any way to call the SendClick built-in function using the JSON-RPC API (this would be needed to simulate pressing the Search option in the sidebar directly, i.e. without moving the cursor appropriately and then selecting the current item).
Reply
#77
is it possible to use RunScript(script[,args]*) to perhaps run a background python script that will accomplish this?
Reply
#78
Well, it's probably possible, but it's a kludge, not a real solution, sorry. Of course, you are more than welcome to use it on your own as kodivc is free software.

The correct way to achieve what you want seems to be using the EventServer API, but that requires implementing support for it in C, which isn't something I feel like doing. Pull requests are most welcome, though Wink
Reply
#79
(2015-09-14, 11:01)Kempniu Wrote: Your idea itself is just fine, yet this would be problematic given that I am not aware of any way to call the SendClick built-in function using the JSON-RPC API (this would be needed to simulate pressing the Search option in the sidebar directly, i.e. without moving the cursor appropriately and then selecting the current item).

perhaps you could use this:

Enter ? (ACTION_ENTER) Not sure about all areas, but on some windows this will be the same as the "done" on screen button.

Documented overhere:
http://kodi.wiki/view/Action_IDs

Action IDs you can fire with the method Input.ExecutionAction
Proud owner of comics42.shop 
Reply
#80
Please correct me if I'm wrong, but I believe you misunderstood the issue. The problem is not how to close the pop-up spelling dialog, because kodivc already does that, but rather how to open that very dialog in the first place, without explicitly moving the cursor through the side menu and then selecting the Search item.
Reply
#81
(2015-09-16, 12:28)Kempniu Wrote: Please correct me if I'm wrong, but I believe you misunderstood the issue. The problem is not how to close the pop-up spelling dialog, because kodivc already does that, but rather how to open that very dialog in the first place, without explicitly moving the cursor through the side menu and then selecting the Search item.

My bad....

I know you said "without explicitly moving", but would it be an option, once the contextmenu is open, to use infolabels to know where is what in that screen (http://kodi.wiki/view/InfoLabels -> under container) and use down commands to go there?
Proud owner of comics42.shop 
Reply
#82
Well, it's definitely implementable, but it would break the way kodivc is currently operating (listen to a command, make a JSON-RPC request, repeat; possibly with multiple commands in a single batch), because an extra JSON-RPC query-response pair would be required to actually perform the SEARCH voice command (note that I haven't actually tested that this would work at all, I just skimmed through the docs). And if you think about it, this method still requires you to open the context menu first. And once it's open, one can simply say UP TWO SELECT or DOWN FIVE SELECT - it's not like the Search item keeps randomly floating around all over the place.

All that's needed to implement this feature in a clean manner is to have a JSON-RPC method which allows activating arbitrary elements of the interface. Sadly, Kodi currently lacks it AFAIK.
Reply
#83
(2015-09-16, 13:09)Kempniu Wrote: Well, it's definitely implementable, but it would break the way kodivc is currently operating (listen to a command, make a JSON-RPC request, repeat; possibly with multiple commands in a single batch), because an extra JSON-RPC query-response pair would be required to actually perform the SEARCH voice command (note that I haven't actually tested that this would work at all, I just skimmed through the docs). And if you think about it, this method still requires you to open the context menu first. And once it's open, one can simply say UP TWO SELECT or DOWN FIVE SELECT - it's not like the Search item keeps randomly floating around all over the place.

All that's needed to implement this feature in a clean manner is to have a JSON-RPC method which allows activating arbitrary elements of the interface. Sadly, Kodi currently lacks it AFAIK.

Maybe a feature request :-)
You could ask montellese if there's a nicer way to accomplish this (JSON-RPC part of the forum).
Proud owner of comics42.shop 
Reply
#84
So far the best I can do is open up the search window when I say SEARCH or FIND. Then I have to manually put the system in spelling mode and spell out the name of the movie then issue voice command UPWARDS or DOWNWARDS to get to the DONE key and say SELECT. It's a good start Smile
Reply
#85
(2015-09-16, 17:04)[email protected] Wrote: Then I have to (...) issue voice command UPWARDS or DOWNWARDS to get to the DONE key and say SELECT.
Have you tried just saying ACCEPT instead?
Reply
#86
I am kind of jumping on the end of this conversation with no real knowlage but could you use the JSON-RPC API to go to the search result page with the argument for the query? Assuming thats how the search results are queried. As an alternative maybe call a search plugin which you could pass an argument to.

Just thoughts. Maybe useless. I will be giving this plugin a try though.
Check out all my How-To's at http://KnightCinema.com
Maine, USA.
Using XBMC since Dharma 2010
Reply
#87
(2015-09-17, 22:49)jknight2014 Wrote: (...) could you use the JSON-RPC API to go to the search result page with the argument for the query? Assuming thats how the search results are queried.
Please forgive me, but I am unable to understand what you wrote.

(2015-09-17, 22:49)jknight2014 Wrote: As an alternative maybe call a search plugin which you could pass an argument to.
What is a "search plugin"?

(2015-09-17, 22:49)jknight2014 Wrote: I will be giving this plugin a try though.
If you were referring to kodivc, it's not a plugin Smile
Reply
#88
The last few posts were about how to get to use this to search. If your program could have a search command like "Search for 'The Avengers'" then you could maybe pass that query "The Avengers" directly to the api ether by loading the search results page with the query as an argument (I have no idea if this is possible at all) or having the API call a Kodi Plugin that would preform the search and display results. Maybe this is more than your program is expected to do. It was just a thought.

(2015-09-17, 23:06)Kempniu Wrote:
(2015-09-17, 22:49)jknight2014 Wrote: I will be giving this plugin a try though.
If you were referring to kodivc, it's not a plugin Smile
Sorry, Program. Too much termonology.
Check out all my How-To's at http://KnightCinema.com
Maine, USA.
Using XBMC since Dharma 2010
Reply
#89
(2015-09-17, 15:32)Kempniu Wrote:
(2015-09-16, 17:04)[email protected] Wrote: Then I have to (...) issue voice command UPWARDS or DOWNWARDS to get to the DONE key and say SELECT.
Have you tried just saying ACCEPT instead?

Yah, that works better Big Grin
Reply
#90
(2015-09-17, 23:20)jknight2014 Wrote: If your program could have a search command like "Search for 'The Avengers'" (...)
It can't. It's a dumb, dictionary-based voice-to-JSON-RPC bridge, not Siri for Linux Wink

(2015-09-17, 23:20)jknight2014 Wrote: (...) then you could maybe pass that query "The Avengers" directly to the api ether by loading the search results page with the query as an argument (I have no idea if this is possible at all) or having the API call a Kodi Plugin that would preform the search and display results.
Again, I'm sorry, but unless you can point out specific JSON-RPC methods capable of doing these things you described, I have no idea what you're talking about.

(2015-09-17, 23:20)jknight2014 Wrote: Maybe this is more than your program is expected to do. It was just a thought.
Sure, no harm done Smile
Reply
  • 1
  • 3
  • 4
  • 5
  • 6(current)
  • 7

Logout Mark Read Team Forum Stats Members Help
[Linux] kodivc - a program for controlling Kodi with simple voice commands2