Use alexa to control your music from soundcloud
Update 01/2018
The development environment around alexa has changed a lot.
Since Amazon added audio player support, the described workaround here isn't necessary anymore. Therefore, I built a new skill, that supports soundcloud directly. Feel free to check it out.
https://github.com/paszin/alexa-soundcloud
This is a guide on how to write a custom skill that plays music on the amazon echo. Amazon Echo offers a few music services (like pandora or prime music or spotify), but unfortunately not soundcloud. Furthermore amazon does not allow to develop music application. The support to play mp3 files is very limited. So, here is the hack-around:
The following components are required.
First we pair the Echo and our local server with bluetooth. Then we ask alexa to ask our custom skill to play music. The custom skill leverages aws lambda to make a request to our local server. Since our server is paired with alexa, we will hear the sound on the alexa.
Folder: /raspberry
npm install
sudo su
//port 80 requires sudoexport SOUNDCLOUD_ALEXA_BRIDGE_CLIENT_ID=1a23b4c56
//replace with client id from four soundcloud appnodemon index.js
Folder: aws_lambda
app.py
to code
access_token = None
with access_token = "your soundcloud token"
(Account Linking in progress, see Future Work)base_url
in Server with the ip address from your serverFolder: alexa
intent_schema.json
to Interaction Model > Intent Schemasample_utterances.txt
to Interaction Model > Sample Utterances