filmov
tv
Trivia game with OSKR and VectorX: trigger voice input

Показать описание
Here's an update to Vector's Go-SDK Wrapper and VectorX.
I think that one of Vector's problem is that it is a bit limited in input. If I want to implement a game using the SDK, I have a few ways to interact with
Vector. One is its camera. Vector has some artificial vision capabilities, so he can locate its cube and some other patterns. I have used this skill in the pong game. Remember this video?
It has a back button that triggers voice recognition. He can detect whether he is lifted or not, and measure acceleration. This can be useful in building a game, I haven't explored this yet.
But Vector's preferred interaction skill is voice. It has voice recognition, through its cloud counterpart called chipper.
The problem with voice interaction is that normally it can't be triggered by Vector. You are limited to say "Hey Vector, do this". And he does. "Hey Vector, do that". And he does. Vector can't
ask you to choose this or that. The only exception is when playing blackjack, but that behavior is hardcoded and can't be replicated using the SDK.
Fortunately if you have an OSKR bot, and you haven't enabled Alexa, there's a trick that a SDK app can use to trigger a voice command request. Basically, we can simulate that the back
button has been pressed. This will force Vector to stream audio to cloud and look for a voice command.
I have the allowed VectorX applications to add a "catch-all" intent that will match any input and trigger a specific intent. An application can thus register this catch all intent, then trigger
audio input and terminate. Vector will invoke chipper, stream the audio, Wirepod decodes the text and hand it to VectorX, VectorX calls the catch-all application passing the text. The application
can now decide what to do with the input. This also requires that the application state can be stored in custom settings, because the application rises and dies at every voice command invocation.
There are 20 questions about 80s and 90s sci-fi movies, pulled out from a simple web server I wrote.
The questions are quite simple, well at least they are for me! I asked ChatGPT to write and translate them in the four different languages VectorX supports.
Now if you don't say anything, Wirepod will return a no-audio error to Vector and won't invoke VectorX. But no problem, whatever "hey vector" command you'll say next will trigger the catch-all
intent and restart the game. You can escape from the game at any time by saying "Quit".
This feature means a lot for implementing games. You can add a card game, a chess game, or anything else that requires user to make a choice. The only disadvantage is that it requires OSKR.
It won't work on a production bot.
I hope I haven't infringed any copyright by having sat a Lord Garmadon on Vector's cube just for the sake of variety.
I think that one of Vector's problem is that it is a bit limited in input. If I want to implement a game using the SDK, I have a few ways to interact with
Vector. One is its camera. Vector has some artificial vision capabilities, so he can locate its cube and some other patterns. I have used this skill in the pong game. Remember this video?
It has a back button that triggers voice recognition. He can detect whether he is lifted or not, and measure acceleration. This can be useful in building a game, I haven't explored this yet.
But Vector's preferred interaction skill is voice. It has voice recognition, through its cloud counterpart called chipper.
The problem with voice interaction is that normally it can't be triggered by Vector. You are limited to say "Hey Vector, do this". And he does. "Hey Vector, do that". And he does. Vector can't
ask you to choose this or that. The only exception is when playing blackjack, but that behavior is hardcoded and can't be replicated using the SDK.
Fortunately if you have an OSKR bot, and you haven't enabled Alexa, there's a trick that a SDK app can use to trigger a voice command request. Basically, we can simulate that the back
button has been pressed. This will force Vector to stream audio to cloud and look for a voice command.
I have the allowed VectorX applications to add a "catch-all" intent that will match any input and trigger a specific intent. An application can thus register this catch all intent, then trigger
audio input and terminate. Vector will invoke chipper, stream the audio, Wirepod decodes the text and hand it to VectorX, VectorX calls the catch-all application passing the text. The application
can now decide what to do with the input. This also requires that the application state can be stored in custom settings, because the application rises and dies at every voice command invocation.
There are 20 questions about 80s and 90s sci-fi movies, pulled out from a simple web server I wrote.
The questions are quite simple, well at least they are for me! I asked ChatGPT to write and translate them in the four different languages VectorX supports.
Now if you don't say anything, Wirepod will return a no-audio error to Vector and won't invoke VectorX. But no problem, whatever "hey vector" command you'll say next will trigger the catch-all
intent and restart the game. You can escape from the game at any time by saying "Quit".
This feature means a lot for implementing games. You can add a card game, a chess game, or anything else that requires user to make a choice. The only disadvantage is that it requires OSKR.
It won't work on a production bot.
I hope I haven't infringed any copyright by having sat a Lord Garmadon on Vector's cube just for the sake of variety.
Комментарии