tamhinsf / azure4alexa Goto Github PK
View Code? Open in Web Editor NEWCreate and Host Alexa Custom Skills using .NET and Azure
License: Other
Create and Host Alexa Custom Skills using .NET and Azure
License: Other
Hi @tamhinsf,
Thank you for adding this project. It is a great help for me to create my own audio skill.
I was able to use your code to get my skill started. I can play a song and I can go to the next song when a user says: Alexa, Next.
I am having issues with ENQUEUE. Once the song ends, the other one does not start. I have made sure that on OnAudioPlayerAsync, I call the ENQUEUE action. I am passing the following (sample) response back to Alexa
{
"Card": null,
"OutputSpeech": null,
"Reprompt": null,
"ShouldEndSession": true,
"Directives": [{
"type": "AudioPlayer.Play",
"playBehavior": "ENQUEUE",
"audioItem": {
"stream": {
"token": "33|fdd9052a-717f-414f-a438-1072a64d0f49|831",
"expectedPreviousToken": "33|fdd9052a-717f-414f-a438-1072a64d0f49|830",
"url": "https://www.ppp.com/mysong.mp3",
"offsetInMilliseconds": 0
}
}
}]
}
Can you please guide me on what could be going wrong?
Hi Tam,
Thank you so much for this. I've been trying to wade through the Amazon documentation trying to unpick it from AWS and Lambda but after some googling found your repo. Your excellent step by step instructions had me talking to my own custom skill in Azure within half an hour!
I did find something strange though. You opted to use SpeechletAsync
but have chosen not to implement the overrides asynchronously. The signature for OnIntentAsync
could look like this:
public override async Task<SpeechletResponse> OnIntentAsync(IntentRequest intentRequest, Session session)
and Tfl.Status.GetResults
could also be changed to be async, so that the call to the TFL service could be done like var httpResponseMessage = await httpClient.GetAsync(tflStatusUrl);
and the result read like httpResultString = await httpResponseMessage.Content.ReadAsStringAsync();
.
If it would help I could submit a PR with these changes in it (it will be my first proper PR in GitHub - so you may need to work though the process together!)
I haven't even looked at the outlook and Auth 2.0 stuff yet, but that could be very useful too - thanks again!
HTH, Jason
I got a small question about deployment process. In the readme you mention that after you create your skill in dev portal you need to copy applicationid into the code and redeploy the api app. But I've just taken the code as it is, deployed it to my Azure and linked to my skill and it worked. I didn't need to populate ApplicationId in the code.
Has something changed and it's no longer required? Or am I doing something wrong?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.