This is a simple skill which allows you to play some of the most popular Romanian radio stations.
Currently, the supported radio stations are:
You can find the stations inside ./lambda/custom/Stations.ts
.
- Node.js
- Register for an AWS Account
- Register for an Amazon Developer Account
- Install and Setup ASK CLI
- Install the dependencies
$ npm install
ASK CLI will create the skill and the Lambda function for you. The Lambda function will be created in us-east-1 (Northern Virginia)
by default.
-
Navigate to the project's root directory. you should see a file named 'skill.json' there.
-
Deploy the skill and the Lambda function in one step by running the following command:
$ ask deploy
In order to develop locally and see your changes reflected instantly, you will need to create an SSH tunnel or expose somehow your local development server. There are several services that allow you to do this, for example ngrok or serveo.net.
This is the easiest to setup
- You need to have an SSH client installed, then simply run
$ ssh -R 80:localhost:3980 serveo.net
Forwarding HTTP traffic from [https://YOUR_URL]
Press g to start a GUI session and ctrl-c to quit.
-
Once you see the URL, copy it and go to your Skill console.
-
Open the
Endpoint
menu and selectHTTPS
-
Under
Default Region
paste the previous URL you copied. -
On the select box choose:
My development endpoint is a sub-domain of a domain that has a wildcard certificate from a certificate authority
. -
You are done! Just run
npm start
to start the local server and begin testing the skill.
-
Run
ngrok http 3980
-
Copy the URL and follow the same steps above from 3 to 6.
Command | Description |
---|---|
clean |
Deletes the dist folder |
build |
Builds the lambda function and exports it to the dist folder |
deploy |
Builds the lambda function and deploys EVERYTHING (skill, model, lambda) |
deploy:lambda |
Builds the lambda function and deploys it (just the lambda function) |
deploy:local |
Deploys the skill details for the local profile, which will update the HTTPS endpoint |
start |
Starts the local express server using nodemon for local development |
To see the actual commands, check package.json
.
Also check the ASK CLI Command Reference for more details on using the ASK CLI
.
Taken from the official hello world project.
-
To test, you need to login to Alexa Developer Console, and enable the "Test" switch on your skill from the "Test" Tab.
-
Simulate verbal interaction with your skill through the command line (this might take a few moments) using the following example:
$ ask simulate -l en-US -t "open greeter" ✓ Simulation created for simulation id: 4a7a9ed8-94b2-40c0-b3bd-fb63d9887fa7 ◡ Waiting for simulation response{ "status": "SUCCESSFUL", ...
-
Once the "Test" switch is enabled, your skill can be tested on devices associated with the developer account as well. Speak to Alexa from any enabled device, from your browser at echosim.io, or through your Amazon Mobile App and say :
Alexa, start hello world
Taken from the official hello world project.
-
./skill.json
Change the skill name, example phrase, icons, testing instructions etc ...
Remember than many information are locale-specific and must be changed for each locale (e.g. en-US, en-GB, de-DE, etc.)
See the Skill Manifest Documentation for more information.
-
./lambda/custom/index.ts
Modify messages, and data from the source code to customize the skill.
-
./models/*.json
Change the model definition to replace the invocation name and the sample phrase for each intent. Repeat the operation for each locale you are planning to support.
-
Remember to re-deploy your skill and Lambda function for your changes to take effect.
$ ask deploy
Open sourced under the MIT license.