Coder Social home page Coder Social logo

alexa-voice-service's Introduction

MyOwnAlexa

An Android application which gives you your own Artificial Personal Assistant - ALEXA

How to run the application ?

  1. Follow the process for creating a connected device detailed at this Amazon link https://developer.amazon.com/appsandservices/solutions/alexa/alexa-voice-service/getting-started-with-the-alexa-voice-service.
  2. Also see this github link for better understanding https://github.com/alexa/alexa-avs-sample-app. Don't forget to enable your security profile for Login with Amazon!
  3. Add your api_key.txt file (part of the Amazon process) to the app/src/main/assets folder.
  4. Enter the PRODUCT_ID in the MainActivity.java that you configured for "Application Type Id" above.
Fill in the Device type ID here or Application type ID 
private static final String PRODUCT_ID = "DhanrajCompanionProduct"; 
  1. Build and run the sample app using Gradle from the command line or Android Studio!

Steps from Login to Talk Box.

  1. Install the application in mobile. Press the Login button on the screen it will take you to your web browser to login in your account through your security profile which you set for registering your product and to get access token for communicating with Alexa.
  2. Now you will be directed to Talk Box activity where you can talk with Alexa. Just keep your finger down on the button and ask your question and release it when you are finished.

Set an alarm

You can set an alarm by asking "Set an alarm" and wait for the response as it is a continuous session. Now don't press the button as Alexa will ask you the time for the alarm. After setting the alarm you can continue as before.

You can delete the alarm from the list by long pressing the desired alarm.

The application is completely build from the AVS Documentation.

License

MyOwnAlexa is under MIT License.

alexa-voice-service's People

Contributors

raj10071997 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

alexa-voice-service's Issues

How to play music?

Hi @raj10071997 I want to listen the music but it says "Sorry music and radio playback are not supported in this device"

Can you assist me how can I play music?

Got problems when running the app

hello raj10071997,
It is my honor to study your project. When i run the app, the mainactivity and the browser take turns showing in front of screen and i just cannot stop them unless i kill the process. It must be wrong somewhere. If i want to run the app, do i only need to register the api_key.txt and the security profile? I guess that i made some mistakes during creating the api key and security profile. For example, i used my own PC's MD5 and SHA256 and changed PRODUCT_ID in mainactivity with my own. What else should i pay attention to? Thanks for your help!

Playing the response

Hi,

First of all, this is not an issue on your code but a help request.

I am implementing Alexa in Kotlin. I am able to login properly and I am able to sent voice request and response octet stream is also coming back. I wrote it to an mp3 file but the media player is giving me status failed 0x1 at prepare.

I wrote it to an external director to check the file in PC, there also it didnt work. Do we need to modify the response stream? I am beating my head on this for past 3 days. see my query at

https://stackoverflow.com/questions/50520950/updatedhow-to-integrate-alexa-voice-service-to-custom-android-app

any help appreciated

-anoop

how to control AudioPlayer Interface

hey,glad to be here to study your project about alexa,when i play a music,how to control it,eg:pause,resume,stop,the avs document give a complex status and we should send a seris of event to alexa,can you give me some advice

how to get my own intent

eg:define a custom skills ,i speak alexa,please turn left,how can i get intent,them i can control my device to turn left,now i get the following json:
{
"directive":{
"header":{
"namespace":"SpeechSynthesizer",
"name":"Speak",
"messageId":"40099ed0-acff-42d4-b398-92f8ae0f1e16",
"dialogRequestId":"dialogRequest-321"
},
"payload":{
"url":"cid:ValidatedSpeakDirective_amzn1.ask.skill.3088929e-d56b-4b22-a246-67d28fe2aaf7_819da5fe-ac4f-40ea-9025-f799536207dd_698848474",
"format":"AUDIO_MPEG",
"token":"amzn1.as-ct.v1.ThirdPartySdkSpeechlet#ACRI#ValidatedSpeakDirective_amzn1.ask.skill.3088929e-d56b-4b22-a246-67d28fe2aaf7_819da5fe-ac4f-40ea-9025-f799536207dd"
}
}
}

i can not get useable field to judge my intent

but when i say set a alarm,i get:
{
"directive":{
"header":{
"namespace":"Alerts",
"name":"SetAlert",
"messageId":"f8c02ddb-b0a3-45f7-bbce-c2725bedb8fb"
},
"payload":{
"type":"ALARM",
"scheduledTime":"2017-07-31T16:00:00+0000",
"token":"amzn1.as-ct.v1.Domain:Application:Notifications#DNID#7f9c588c-64cf-3802-96da-b562cf6b2267"
}
}
}
so we can get the filed like "type".so i can set alarm in my project

so,how can i define a skills let amazon web service respone useable filed to judge my intent

look forward for your replay thanks

Not supported

We got the PRODCUT_ID and API_KEY from the amazon developer product page. Then we used that into your project, but its not supported.

What we have added as a skills and endpoint, its not reaching and not able to get the proper response from endpoint. WHY? you have an idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.