Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Capture the Alexa answer to elaborate it c++ #764

Closed
dottantgal opened this issue Jun 6, 2018 · 4 comments
Closed

Capture the Alexa answer to elaborate it c++ #764

dottantgal opened this issue Jun 6, 2018 · 4 comments

Comments

@dottantgal
Copy link

Hi all,
is there any way to capture the answers coming from Alexa Sample App, handle them and, for example, send commands to a robot?
I'm trying to locate which part of the Sample App is involved in the handling of the answers coming from the AWS but i still have to find it.
I'm developing on Ubuntu with the c++ sdk.
Thank you

@kencecka
Copy link
Contributor

kencecka commented Jun 7, 2018

Hi @dottantgal,

This questions sounds very similar to what you were asking in #721. AVS is focused almost exclusively on audio-in and audio-out. It does not provide any way for a skill to communicate commands down to a device. In other words, there is no data that flows through the C++ SDK which you could use to control your robot. The only data that the SDK sees is the actual audio content that plays out.

To send commands from your skill to your device, you will need to explore another communications path such as AWS IoT.

Ken

@dottantgal
Copy link
Author

dottantgal commented Jun 7, 2018

Hi @kencecka
thank you so much 'bout the answer.
Starting from a scenario where I've uploaded my lambda function (which include ROS code to publish some ROS messages) on the AWS and where I've implemented my own skill (which has to be used to move the robot) that I've already connected to the uploaded lambda function, I've created a new alexa device on my embedded board and on this board i run the SampleApp. At this point , using the SampleApp, Alexa can answer correctly to my skill and along to this answer, the lambda function has to return also ROS messages. Now, looking at what you wrote, there isn't a way to "catch" the answer of AVS to my skill using the c++ sdk, so the SampleApp doesn't have an event where i can write code to capture the result of the AVS elaboration in such a way that based on the answer i can handle what the robot can do (so i don't have to upload in the lambda function also ROS code), but i have to use another known method to make visible the embedded board on the net (basically is to make the embedded board visible with a static public IP, set this IP within the uploaded lambda function to make the connection between the AWS and the ROS websocket bridge which will catch the incoming ROS messages on the embedded board)
Here you write "The only data that the SDK sees is the actual audio content that plays out." so, is it possible to capture this audio content? is this some kind of string which is handled as a TTS as asnwer or it is a pure audio file played by the mediaplayer?
Let me know if what i wrote about the SampleApp and the sdk is correct
Thank you so much

@kencecka
Copy link
Contributor

kencecka commented Jun 8, 2018

Hi @dottantgal,

Reading your summary, I think you have a correct understanding of AVS and the SDK. To answer some of your remaining questions:

i have to use another known method to make visible the embedded board on the net

Not necessarily visible, but you do need a way for your lambda to send a message to your board.

basically is to make the embedded board visible with a static public IP, set this IP within the uploaded lambda function to make the connection between the AWS and the ROS websocket bridge which will catch the incoming ROS messages on the embedded board

This is where AWS IoT may be of interest to you. If you connect your device to AWS IoT, you can have your lambda publish a message to a topic in AWS IoT and your device will receive a notification of that message. This does not require opening up a public IP to your device; it connects to AWS IoT as a client.

is it possible to capture this audio content? is this some kind of string which is handled as a TTS as asnwer or it is a pure audio file played by the mediaplayer?

It is possible to capture the audio content, but that content is an MP3 file. You wouldn't have any easy way to interpret what it actually means. In AVS, when alexa speaks, the text-to-speech operation happens in the cloud, and the device only sees the MP3 audio. The text is never sent down to the device.

Ken

@scotthea-amazon
Copy link
Contributor

Hi @dottantgal,

It appears that @kencecka has answered your questions, so I am closing this issue. If you have other questions, please open a new issue. If you think that this issue should not have been closed, please feel free to re-open it and clarify what need to be addressed.

Thank you,
-SWH

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants