Steps to Build a Music, Radio, or Podcast Skill


To create a music, radio, or podcast skill for a content service, you provide information, configuration, and an endpoint for your skill code. Your skill code is an Amazon Web Services (AWS) Lambda function that handles requests from the Alexa Music, Radio, and Podcast Skill API and communicates with your content service cloud.

Music and podcast providers can create a new skill in the developer console or with the Alexa Skills Kit Command Line Interface (ASK CLI). For details, see Create a new skill in the developer console or Create a new skill with the ASK CLI.

With just their streaming URL and other station metadata, radio providers can follow a no-code process to make their stations available to Alexa. To learn more and get started, use your Amazon developer account to sign in to the Radio Skills Kit (RSK) console. Radio providers can also use the ASK CLI to create a skill. For details, see Create a new skill with the ASK CLI, and contact your Alexa Music representative.

Prerequisites

Before you build a music, radio, or podcast skill, make sure that you have the following items:

  • An Amazon developer account. You can use an existing Amazon account to sign in, or you can create a new Amazon developer account. The account is free.
  • An Amazon Web Services (AWS) account. As part of its free tier of services, AWS gives you access to resources such as the AWS Lambda that hosts your skill code.
  • An Alexa-enabled device, such as an Amazon Echo. Make sure that you sign in to the Echo with the same credentials as your Alexa developer account.
  • The Amazon Alexa app on your mobile device. For instructions, see Download the Alexa app on the Amazon website. Make sure that you sign in to the Alexa app on your mobile device with the same credentials as your Alexa developer account.

Steps to build a music, radio, or podcast skill

To build a music, radio, or podcast skill, complete the following steps:

  1. Create a skill in the developer console.
  2. Create a Lambda function.
  3. Implement required features in your Lambda function.
  4. Include optional features in your skill.
  5. Upload catalogs.
  6. Enable the skill for testing.
  7. Test the skill in the Alexa app.
  8. Provide publishing information.
  9. Submit the skill for certification.

Step 1: Create a skill in the developer console

You can create a new music or podcast skill in the Alexa Skills Kit developer console. To create a music, radio, or podcast skill with the Alexa Skills Kit (ASK) Command Line Interface (CLI), see Create a new skill with the ASK CLI.

To create a new skill in the developer console

  1. Sign in to the Alexa developer console.
  2. Click Create Skill.
  3. Under Name, Locale, enter the skill name and default language, and then click Next.

    • Skill name: This is the name customers will see when you publish the skill. You can edit this name later on the Distribution page.
    • Primary locale: You can add additional languages to the skill later.
  4. Under Experience, Model, Hosting service > Choose a type of experience, select Music & Audio.
  5. Under Choose a model, select Music, and then click Next.
  6. Under Review, check your selections. To make a change, click the prior step. Otherwise, click Create skill.
  7. In the left pane, click Endpoint.
  8. Copy the skill ID displayed near the top of the page. For example, amzn1.ask.skill.22649d8f-0451-4b4b-9ed9-bfb6c036f905.
  9. In a convenient place, such as Notepad on Windows or TextEdit on Mac, paste the Alexa Client Id and Alexa Client Secret values, and then save the file. You need the skill ID to configure your AWS Lambda function.

To enter your skill name, prompt name, or invocation names

  1. In the left pane, click Skill Names.
  2. Enter your public skill name, prompt name, and invocation name.
  3. In the top right corner of the page, click Save.

To select the interfaces that your skill supports

  1. In the left pane, click Interfaces.
  2. For each interface that your skill supports, select the check box.
  3. In the top right corner of the page, click Save.

To select the features that your skill supports

  1. In the left pane, click Features.
  2. For each feature that your skill supports, select the check box. For details about the explicit language filter (ELF), see ELF feature.
  3. In the top right corner of the page, click Save.

Step 2: Create a Lambda function

You need an AWS Lambda function for your skill code. First create an IAM role for the Lambda function, then create the Lambda function.

Create an IAM role for Lambda

If you haven't worked with Lambda before, you need to create an Identity and Access Management (IAM) role that enables basic execution. If you already have a role that allows basic execution for Lambda, skip to the next section.

To create an IAM role

  1. Sign in to the IAM console.
  2. On the left side of the page, click Roles. Then click the Create role button.
  3. Select AWS service. Then, for Choose the service that will use this role, click Lambda. Then click the Next: Permissions button.
  4. In the search box next to Filter policies, enter "basic." Select the check box next to AWSLambdaBasicExecutionRole, then click the Next: Review button.
  5. In the box next to Role name, enter a name for the role. For example, "LambdaRoleForAlexaSkill." Then click the Create role button.

Create the Lambda function

You use AWS Lambda to host the skill code for your skill. AWS Lambda is a web service that lets you run code in the cloud without managing servers. The Alexa Music, Radio, and Podcast Skill API sends requests to your skill code. Your code inspects the request, takes any necessary actions, and then sends back a response.

To create a Lambda function in the AWS Lambda console

  1. Sign in to the AWS Lambda console.
  2. Look in the top right corner of the page to make sure the US East (N. Virginia) region is selected.
  3. Click the Create function button.
  4. Select Author from scratch, then do the following:
    1. For Name, enter a name for your Lambda function. For example, "MySkillLambda."
    2. For Runtime, choose the programming language or environment that you prefer for your skill code.
    3. For Role, select Choose an existing role. For Existing role, choose the role that you created previously.
    4. Click the Create function button.
  5. On the left side of the page, for Add triggers, choose Alexa Skills Kit.
  6. At the bottom of the page, for Skill ID verification, select Enable (recommended). For Skill ID, paste the skill ID that you copied from the developer console.
  7. At the bottom of the page, click the Add button. Then, at the top of the page, click the Save button.

After you create your Lambda function, copy the ARN displayed near the top of the page. For example, arn:aws:lambda:us-east-1:111122223333:function:MySkillLambda.

If you created your music, radio, or podcast skill in developer console, complete the following steps to add this ARN to the configuration of your skill. Otherwise, add this ARN to the skill manifest. For details, see Create a new skill with the ASK CLI.

To configure the endpoint in the Alexa developer console

  1. Navigate back to your skill in the Alexa developer console.
  2. Under ACTIONS, from the drop-down menu in your skill's row, select Edit.
  3. On the left pane, click Endpoint.
  4. In the box next to Default endpoint, paste the ARN for the Lambda function, and then click SAVE.

Step 3: Implement required features

After you create the Lambda function and add it to your skill's configuration, you add your skill code to the Lambda function. You can do this in the AWS Lambda console. For details, see creating functions using the AWS Lambda console editor in the AWS Lambda documentation.

Implement required features for a music skill

To build a music skill, you must implement the following directives:

For the best user experience, your skill should support other directives in addition to those in the preceding list. For example, GetPreviousItem allows users to replay the previous track. The API reference documentation contains additional details about the interfaces and the functionality they provide.

Implement required features for a radio skill

To build a radio skill, you must implement the following directives:

You can optionally implement the GetItem directive.

Implement required features for a podcast skill

To build a podcast skill, see Implement Podcast Skill Features.

Step 4: Include optional features in your skill

You can implement the following optional features in your skill:

  • Account linking – Use account linking to connect the identity or data of the skill user with a user identity in your music service cloud. Amazon supports account linking in music and podcast skills.
  • Alexa advertising ID – When you indicate that your skill delivers advertising and you provide a privacy policy, Alexa sends your skill a unique customer advertising ID and the customer preference for receiving interest-based ads in the RequestContext object. Amazon supports Alexa advertising ID in music and radio skills.

Step 5: Upload catalogs

For music and radio skills, see Upload Music or Radio Catalogs.

For podcast skills, see Upload Podcast Catalogs.

Step 6: Enable the skill for testing

Complete the steps to enable your skill for testing in the developer console. Use the Test page in the developer console to test your skill with the Alexa simulator.

Step 7: Test the skill in the Alexa app

After your implementation is complete and you test your skill code in Lambda, you can functionally test your skill with an Alexa-enabled device.

To test your skill in the Alexa app

  1. Find your skill in the Alexa app, and then enable your skill and (if needed) set up account linking.
  2. Give Alexa commands using the utterances that your skill supports. Make sure to test the skill with valid utterances and invalid ones, and in a variety of conditions, such as with the skill enabled, disabled, not account linked, and so on.
  3. When you're satisfied with your skill's performance, you can submit it for certification.

For details, see the testing guide.

Step 8: Provide publishing information

To distribute your skill to the Amazon Alexa Skills Store, you must fill out the required metadata for your skill on the Distribution tab in the developer console. For details about publishing your skill, see Define Skill Store Details and Availability.

Step 9: Submit the skill for certification

When you're ready to publish your skill, submit it for certification. For details, see Submit Skills for Certification in the Alexa Developer Console. After your skill is certified and published, it appears in the Alexa Skills Store for Alexa users to discover.

Explicit language filter feature

The ELF is a feature for music and radio skills that gives users more control over their listening experience. Users can let Alexa know that they prefer to listen to songs, playlists, and stations without explicit content. When the ELF feature is turned on, Alexa plays content only from skills that support the feature.

To support ELF in a music skill, you must do the following:

  1. Enable the ELF feature, which tells Alexa that the skill can filter explicit content. Do this by selecting the Explicit Language Filter check box on the Features page in the Alexa developer console, or by adding EXPLICIT_LANGUAGE_FILTER as a feature in your skill manifest.

  2. Modify your skill code (Lambda function) to handle the ExplicitLanguageAllowed field in Initiate and GetPlayableContent requests. The skill must not return identifiers for explicit content when ExplicitLanguageAllowed is set to false.

If you can't guarantee that your skill can exclude explicit content, disable the ELF feature so that the skill isn't available to users who have configured Alexa to block explicit content.

Create a new skill with the ASK CLI

You can use the ASK CLI to create and manage skills from the command line. To create a skill in the developer console instead, see Step 1: Create a new skill.

To install the ASK CLI, complete steps 1 – 3 of the Quick Start ASK CLI page. To see a video that demonstrates how to use the CLI, see ASK CLI Setup on YouTube. Before you use the CLI, you should be familiar with the ASK CLI commands not supported for music, radio, or podcast skills.

To create your skill using the ASK CLI, first create a Lambda function for your skill's code and note the ARN of the Lambda function. Then use the following command, replacing music-skill.json with the name of a file that contains a valid music, radio, or podcast skill manifest. For an example, see the Example music skill manifest.

ask api create-skill -f music-skill.json

See the following example:

C:\> ask api create-skill -f music-skill.json
Create skill request submitted.
Skill ID: amzn1.ask.skill.d12647e2-4e5b-4870-9f3c-09a1b88da1a4
Please use the following command to track the skill status:
    ask smapi get-skill-status -s amzn1.ask.skill.d12647e2-4e5b-4870-9f3c-09a1b88da1a4

C:\> ask smapi get-skill-status -s amzn1.ask.skill.d12647e2-4e5b-4870-9f3c-09a1b88da1a4
{
  "manifest": {
    "eTag": "fbcc6fe0491166550b11a819d55b106e",
    "lastUpdateRequest": {
      "status": "SUCCEEDED"
    }
  }
}

After you create a skill, copy the skill ID (for example, amzn1.ask.skill.d12647e2-4e5b-4870-9f3c-09a1b88da1a4). Then use this skill ID to add a trigger for your Lambda function.

To create a trigger for your Lambda function:

  1. Sign in to the AWS Lambda console.
  2. Find the Lambda function for your skill, and then click the function.
  3. On the left side of the page, for Add triggers, choose Alexa Skills Kit.
  4. At the bottom of the page, for Skill ID verification, select Enable (recommended). For Skill ID, paste the skill ID.
  5. At the bottom of the page, click the Add button. Then, at the top of the page, click Save.

Create your local project directory

After you create a skill with the preceding command, use the following ASK CLI command to create a local project directory for the skill. Before you use this command, make sure that your skill name is unique among your skills, because the name is used to create (or overwrite) the local project directory. In the following command, replace amzn1.ask.skill.d12647e2-4e5b-4870-9f3c-09a1b88da1a4 with your actual skill ID.

ask smapi export-package -s amzn1.ask.skill.d12647e2-4e5b-4870-9f3c-09a1b88da1a4

Configure your skill properties

To configure the properties of your skill, edit the skill.json file in your local project directory. For details, see the music, radio, and podcast skill property reference.

After you edit the skill.json file, navigate to your local project directory. Then use the ask deploy command to update your skill.

The ask deploy command updates your skill in the Alexa Skills Kit developer console, but doesn't update your live (published) skill. To promote changes from the skill in the developer console to your published skill, you must submit your skill for certification in one of the following ways:

Example music skill manifest

The following example shows a valid music skill manifest. To use this example, change the skill name before creating your skill.

For a complete reference of all properties in a skill manifest, see the skill manifest documentation.

Music, radio, and podcast skill property reference

This section describes the properties that are specific to music, radio, and podcast skills. These properties are specified in the apis.music section of the skill manifest, as shown in the previous example. For a complete reference of all properties in a skill manifest, see the skill manifest documentation.

Field Description Required Type
music.endpoint.uri Contains the Amazon Resource Name (ARN) for the AWS Lambda function that contains your skill code. yes string
music.locales.aliases A list of one, two, or three names with which a user can invoke your skill. This is similar to the skill invocation name for custom skills, but music, radio, and podcast skills allow up to three names. For example, if you set "awesome music" as an alias for your skill, users who want to hear top hits could say, "Alexa, play top hits from awesome music" to invoke your skill.

Existing skill users must disable and then re-enable your skill for alias changes to take effect.
yes list of strings
music.locales.promptName The name that Alexa uses when speaking the name of your skill to users. yes string
music.interfaces A list of skill interfaces that your skill supports. For more details, see the music, radio, and podcast skill API reference. yes list of strings
music.locales.features Indicates whether your skill supports the ELF feature to filter explicit language. If it does, include this property with a value of EXPLICIT_LANGUAGE_FILTER. Otherwise, omit this property. Note that ELF isn't supported for podcast skills." no string
music.contentTypes (Podcast only) Add this field to use GetPlayableContent for state persistence. no object

CLI commands not supported for music, radio, or podcast skills

The following ASK CLI commands and features don't support music, radio, or podcast skills.

ask new
The ask new command can only create a custom skill. For the ASK CLI command to create a music, radio, or podcast skill, see Create a new skill with the ASK CLI.
ask simulate
This feature isn't supported for music, radio, or podcast skills.
ask add and ask remove
These commands refer to in-skill products. In-skill products aren't supported for music, radio, or podcast skills.
ask api subcommands
The following API sub-commands don't support music, radio, or podcast skills.
  • get-model
  • head-model
  • update-model
  • simulate-skill
  • get-simulation
  • invoke-skill
  • create-isp
  • update-isp
  • associate-isp
  • disassociate-isp
  • get-isp
  • list-isp-for-skill
  • reset-isp-entitlement
  • delete-isp
  • intent-requests-history

Submit changes to a live skill

After your skill is live, any changes to the skill must be certified. For example, your skill must be recertified after changing the skill metadata. The certification review needed depends on the type and extent of changes made.

Note that updating your skill's catalog data doesn't require recertification. Skill catalogs are managed separately, with different workflows, compared with skill properties. For more details about catalogs, see upload catalogs.

For details about the different skill statuses, such as Live and In Development, and how to work on a skill after it's published, see publication status and revise and update your skill after publication.


Was this page helpful?

Last updated: Jan 26, 2024