MusicRecording Intents

Introduction

A music recording (track), usually a single song. These intents let users ask for specific information about songs, such as the artist who performs the song, the genre of the song, or other information.

This document provides a quick reference to the MusicRecording intents and corresponding slots. For details around how these intents are specified, see Understanding the Structure of the Built-in Intent Library.

Intent Signature

Use the intent signature as the intent name in your intent schema. This example shows a schema with two MusicRecording intents:

{
    "intents": [
        {
            "intent": "AMAZON.SearchAction<object@MusicRecording[producer]>"
        }, 
        {
            "intent": "AMAZON.SearchAction<object@MusicRecording[byArtist]>"
        }
    ]
}

For more about the components of this signature, see Understanding the Structure of the Built-in Intent Library.

MusicRecording Intents

The following table summarizes the available MusicRecording intents and the set of slots that may be included. For each intent, the sections below the table show:

  • A sample utterance that would invoke the intent.
  • The JSON you include in your intent schema if you want to use the intent.
  • An example of the IntentRequest sent to your skill for the provided sample utterance, illustrating the slots that may be included. For brevity, these samples leave out the full set of properties that are normally part of a complete IntentRequest.

    Note that if your interaction model includes multiple intents with similar utterances, your results may vary from these examples.

For definitions of the slots used in these intents, see MusicRecording Slots.

Intent Signature Example Utterance Possible Slots
AMAZON.SearchAction<object@MusicRecording[byArtist.musicGroupMember]> “who sings this song” object.byArtist.musicGroupMember.type
AMAZON.SearchAction<object@MusicRecording[byArtist]> “who’s playing this song” object.type
object.byArtist.type
AMAZON.SearchAction<object@MusicRecording[duration]> “how long is this song” object.type
object.duration.type
AMAZON.SearchAction<object@MusicRecording[inAlbum]> “what album is this song on” object.inAlbum.type
object.type
AMAZON.SearchAction<object@MusicRecording[producer]> “who produced this song” object.type
object.producer.type

SearchAction<object@MusicRecording[byArtist.musicGroupMember]>

User: who sings this song

Intent Schema:

{
    "intents": [
        {
            "intent": "AMAZON.SearchAction<object@MusicRecording[byArtist.musicGroupMember]>"
        }
    ]
}

Request:

{
    "request": {
        "type": "IntentRequest", 
        "locale": "en-US", 
        "intent": {
            "name": "AMAZON.SearchAction<object@MusicRecording[byArtist.musicGroupMember]>", 
            "slots": {
                "object.byArtist.musicGroupMember.type": {
                    "name": "object.byArtist.musicGroupMember.type", 
                    "value": "sings"
                }
            }
        }
    }
}

SearchAction<object@MusicRecording[byArtist]>

User: who’s playing this song

Intent Schema:

{
    "intents": [
        {
            "intent": "AMAZON.SearchAction<object@MusicRecording[byArtist]>"
        }
    ]
}

Request:

{
    "request": {
        "type": "IntentRequest", 
        "locale": "en-US", 
        "intent": {
            "name": "AMAZON.SearchAction<object@MusicRecording[byArtist]>", 
            "slots": {
                "object.byArtist.type": {
                    "name": "object.byArtist.type", 
                    "value": "playing"
                }, 
                "object.type": {
                    "name": "object.type", 
                    "value": "song"
                }
            }
        }
    }
}

SearchAction<object@MusicRecording[duration]>

User: how long is this song

Intent Schema:

{
    "intents": [
        {
            "intent": "AMAZON.SearchAction<object@MusicRecording[duration]>"
        }
    ]
}

Request:

{
    "request": {
        "type": "IntentRequest", 
        "locale": "en-US", 
        "intent": {
            "name": "AMAZON.SearchAction<object@MusicRecording[duration]>", 
            "slots": {
                "object.duration.type": {
                    "name": "object.duration.type", 
                    "value": "long"
                }, 
                "object.type": {
                    "name": "object.type", 
                    "value": "song"
                }
            }
        }
    }
}

SearchAction<object@MusicRecording[inAlbum]>

User: what album is this song on

Intent Schema:

{
    "intents": [
        {
            "intent": "AMAZON.SearchAction<object@MusicRecording[inAlbum]>"
        }
    ]
}

Request:

{
    "request": {
        "type": "IntentRequest", 
        "locale": "en-US", 
        "intent": {
            "name": "AMAZON.SearchAction<object@MusicRecording[inAlbum]>", 
            "slots": {
                "object.inAlbum.type": {
                    "name": "object.inAlbum.type", 
                    "value": "album"
                }, 
                "object.type": {
                    "name": "object.type", 
                    "value": "song"
                }
            }
        }
    }
}

SearchAction<object@MusicRecording[producer]>

User: who produced this song

Intent Schema:

{
    "intents": [
        {
            "intent": "AMAZON.SearchAction<object@MusicRecording[producer]>"
        }
    ]
}

Request:

{
    "request": {
        "type": "IntentRequest", 
        "locale": "en-US", 
        "intent": {
            "name": "AMAZON.SearchAction<object@MusicRecording[producer]>", 
            "slots": {
                "object.producer.type": {
                    "name": "object.producer.type", 
                    "value": "produced"
                }, 
                "object.type": {
                    "name": "object.type", 
                    "value": "song"
                }
            }
        }
    }
}

MusicRecording Slots

The MusicRecording intents can return slot values to your skill. You do not include these slots in your intent schema – they are generated automatically from the intent signature.

Note that not all available slots are returned from every intent. See the table in MusicRecording Intents to see which slots are applicable to each intent.

The following table shows the slots the MusicRecording intents can return. For each slot, the table includes:

  • The slot name.
  • An example utterance for the slot.
  • The JSON that would be sent to your skill for the sample utterance.
  • If applicable, the name of the slot type used by the slot. You can see details about slot types in the Slot Type Reference.
Slot Name Utterance Slot Values

object.byArtist.musicGroupMember.type

“…who sings

{
    "name": "object.byArtist.musicGroupMember.type", 
    "value": "sings"
}

object.byArtist.type

“…who’s playing

{
    "name": "object.byArtist.type", 
    "value": "playing"
}

object.duration.type

“…how long

{
    "name": "object.duration.type", 
    "value": "long"
}

object.inAlbum.type

“…what album

{
    "name": "object.inAlbum.type", 
    "value": "album"
}

object.producer.type

“…who produced

{
    "name": "object.producer.type", 
    "value": "produced"
}

object.type

“…when did this song

{
    "name": "object.type", 
    "value": "song"
}

Built-in Intent Library Documentation

MusicRecording is used in the following built-in intent library category:

Navigate to all built-in intents in the Built-in Intent Library.

See all available slot types in the Slot Type Reference.

Learn more about using the built-in intent library:

Learn more about building your voice interface:

The built-in intent library incorporates material from Schema.org, which is licensed under the Creative Commons Attribution-ShareAlike License (version 3.0) (the “License”). You may not use this file except in compliance with the License. You may obtain a copy of the License at http://creativecommons.org/licenses/by-sa/3.0/. For questions, please reach out to alexa-ontology-support@amazon.com.