Open warren-bank opened 1 year ago
update:
lambda/index.js
let track = await getRemoteData("?search="+slotValue)
// code will access fields:
track.speech
track.channel
track.name
{
track: {channel: "", name: ""},
speech: ""
}
const data = await getRemoteData("?search="+slotValue)
const track = data.track
// code will access fields:
data.speech
track.channel
track.name
wouldn't be a bad idea to:
lambda
AlexaRadioSkill.zip
into this new branchthat way:
Great idea. Will keep the lambda function in the same branch as an unzipped JS file.
const data = await getRemoteData("?search="+slotValue) const track = data.track // code will access fields: data.speech track.channel track.name
have not worked on this code for a few months. will take a look in the weekend.
no worries..
I just forked a copy.. and will play around with it tonight.
Feel free to merge.. or cherry pick any changes you might like.
this commit fixes that problem..
now, when I run a test in the Alexa Simulator:
it successfully processes the request, and answers correctly..
Unsupported Directive
AudioPlayer is currently an unsupported namespace. Check the device log for more information.
update:
when I test on an Echo Dot (5th gen)..
no change: playing music from provider Warrens Juke Box is not supported
update: the discussion in this issue says that the toast notification is expected behavior, because audio won't play in the browser.. but that doesn't explain why it won't run on the Echo Dot. TBD..
wow.. just wow
unless I'm missing something.. developing for Alexa is a nightmare; I'm been (metaphorically) banging my head against a wall all day.. trial and error.. no debugger.. even reading logs is slow..
worst of all, nothing that should be working.. is working.
well, all of the built-in intents are working.. can "open" the app and issue "pause", "resume", "stop", "next", etc..
but, most importantly.. the custom intent is never passed to the skill. using utterances that are verbatim to what's in the model.. no intent ever hits the "canHandle" test phase. instead, even though I always prefix with "Alexa ask XXX".. Alexa always sends me elsewhere: Google results, Amazon music, Pandora, ...
without the ability to specify a keyword.. to include in the API request that searches for a matching channel or station.. the app always launches on the same channel/station/offset where it left off when stopped.. without any ability to change channel.
it's still better than nothing.. I could live with a single channel (ie: playlist) that can be managed through a web UI. but.. it would be so much better.. if
I've done a ton of refactoring.. and importing the skill directly from the git repo works much better than a zip file.. but, none of it fixes the issue that's driving me nuts.. the damn thing just refuses to work
if I can't fix it.. I'll probably just cause a channel to loop back to the 1st station when it reaches the end of its playlist. Implementing "previous" is also (probably) low hanging fruit.
note to self..
0
in firebase for MRU entry).I completely understand your frustrations. debugging is so damn difficult, sometime i've abandoned projects midway and started fresh, because i just couldn't figure what the error was. if you are up to it, one of these days we could do a share/pair programming session and try and sort it out.
the thing that is driving me most nuts.. is that the search query (custom intent with slot) works in the simulator.. the music doesn't play, but the API request runs and the spoken response is appropriate, but on a real device, (logs indicate that) it never runs the skill
..after all this, I'm still getting:Playing music from provider XXX is not supported
@warren-bank, did you ever get anywhere with this?
@HammyHavoc , I don't think I did.. but I honestly can't even remember. I spent about a month doing a deep dive into writing Alexa skills (a little over a year ago).. and then never touched it again. Memory is a blank. Sorry.
@warren-bank, no prob! :- ) It does seem like writing Alexa skills is weirdly obtuse for what should otherwise be quite an intuitive and straight-forward process. Laborious and time-consuming versus the likes of fiddling with FPGAs and DSP lol.
Hope you're well!
Hi. This project looks great!
My issue is probably/hopefully pilot error.. I'm new to Alexa and skills.
Everything is deployed and appears to be working properly:
Alexa skills..
lambda/index.js
const BASE_URL = "https://alexaradio.vercel.app";
notes:
notes:
In Dev
Promote to live
was never clicked
issue:
when I say:
Alexa, ask Warrens Juke Box to play [name of channel]
the response is:
playing music from provider Warrens Juke Box is not supported
What was my mistake?.. What installation step did I miss?
Thanks again for all this hard work! I'm looking forward to being able to configure my own
.m3u
playlists.. without needing to depend on any 3rd-party service.Besides music, this is going to work great for accessing free audiobooks from Librivox.. which appear to:
.mp3
with an.m3u
playlist