From 7ffdfe2807de2154a310d9538de78db8624a9e38 Mon Sep 17 00:00:00 2001 From: Adam Plocher Date: Mon, 12 Mar 2018 06:33:16 -0700 Subject: [PATCH] Added new interactionModel json format combining intentSchema and sampleUtterances --- README.md | 6 +- speech_assets/intentSchema.json | 139 ------- speech_assets/interactionModel.json | 377 ++++++++++++++++++ .../intentSchema.json | 0 .../{ => non_us}/sampleUtterances.de.txt | 0 .../{ => non_us}/sampleUtterances.ja.txt | 0 .../{ => non_us}/sampleUtterances.txt | 0 .../sample_slot_data/MUSICALBUM.txt | 0 .../sample_slot_data/MUSICGROUP.txt | 0 .../sample_slot_data/MUSICPLAYLIST.txt | 0 .../sample_slot_data/MUSICRECORDING.txt | 0 11 files changed, 380 insertions(+), 142 deletions(-) delete mode 100644 speech_assets/intentSchema.json create mode 100644 speech_assets/interactionModel.json rename speech_assets/{non_us_custom_slot_version => non_us}/intentSchema.json (100%) rename speech_assets/{ => non_us}/sampleUtterances.de.txt (100%) rename speech_assets/{ => non_us}/sampleUtterances.ja.txt (100%) rename speech_assets/{ => non_us}/sampleUtterances.txt (100%) rename speech_assets/{non_us_custom_slot_version => non_us}/sample_slot_data/MUSICALBUM.txt (100%) rename speech_assets/{non_us_custom_slot_version => non_us}/sample_slot_data/MUSICGROUP.txt (100%) rename speech_assets/{non_us_custom_slot_version => non_us}/sample_slot_data/MUSICPLAYLIST.txt (100%) rename speech_assets/{non_us_custom_slot_version => non_us}/sample_slot_data/MUSICRECORDING.txt (100%) diff --git a/README.md b/README.md index 9e224ed..49c878b 100644 --- a/README.md +++ b/README.md @@ -142,7 +142,7 @@ See the note at the top about supported languages. #### US English users -On the "Interaction Model" step, paste in the contents of `speech_assets/intentSchema.json` to the intent schema field and the contents of `speech_assets/sampleUtterances.txt` to the sample utterances field. +On the "Interaction Model" step, paste in the contents of `speech_assets/interactionModel.json` to the JSON Editor. #### Other language users @@ -155,13 +155,13 @@ You need to make four slots and fill them with sample data for each of the follo * MUSICRECORDING * MUSICPLAYLIST -Click "Add Slot Type" and enter `MUSICALBUM` into the "type", then copy and paste the contents of `/speech_assets/non_us_custom_slot_version/sample_slot_data/MUSICALBUM.txt` into the "values" section. +Click "Add Slot Type" and enter `MUSICALBUM` into the "type", then copy and paste the contents of `/speech_assets/non_us/sample_slot_data/MUSICALBUM.txt` into the "values" section. Repeat the process for each of the slots. The sample data was scraped from the UK top 100 singles and album chart. For the MUSICPLAYLISTS there are some generic sample phrases. The sample data is fine to use, don't feel you need to fill these slots to match your own collection. -After you have added the "Custom Slots" you need to copy and paste the contents of `/speech_assets/non_us_custom_slot_version/intentSchema.json` to the intent schema field and the contents of `speech_assets/sampleUtterances.txt` to the sample utterances field. For Japanese users, use `speech_assets/sampleUtterances.ja.txt` to the utterances field. +After you have added the "Custom Slots" you need to copy and paste the contents of `/speech_assets/non_us/intentSchema.json` to the intent schema field and the contents of `speech_assets/non_us/sampleUtterances.txt` to the sample utterances field. For Japanese users, use `speech_assets/non_us/sampleUtterances.ja.txt` to the utterances field. ### Configuration diff --git a/speech_assets/intentSchema.json b/speech_assets/intentSchema.json deleted file mode 100644 index 7de6d68..0000000 --- a/speech_assets/intentSchema.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "intents": [ - { - "intent": "AMAZON.PauseIntent" - }, - { - "intent": "AMAZON.ResumeIntent" - }, - { - "intent": "AMAZON.NextIntent" - }, - { - "intent": "AMAZON.PreviousIntent" - }, - { - "intent": "GeeMusicPlayArtistIntent", - "slots": [ - {"name":"artist_name", "type":"AMAZON.MusicGroup"} - ] - }, - { - "intent": "GeeMusicPlayAlbumIntent", - "slots": [ - {"name":"album_name", "type":"AMAZON.MusicAlbum"}, - {"name":"artist_name", "type":"AMAZON.MusicGroup"} - ] - }, - { - "intent": "GeeMusicPlaySimilarSongsRadioIntent" - }, - { - "intent": "GeeMusicPlaySongIntent", - "slots": [ - {"name":"song_name", "type":"AMAZON.MusicRecording"}, - {"name":"artist_name", "type":"AMAZON.MusicGroup"} - ] - }, - { - "intent": "GeeMusicPlayArtistRadioIntent", - "slots": [ - {"name":"artist_name", "type":"AMAZON.MusicGroup"} - ] - }, - { - "intent": "GeeMusicPlaySongRadioIntent", - "slots": [ - {"name":"song_name", "type":"AMAZON.MusicRecording"}, - {"name":"artist_name", "type":"AMAZON.MusicGroup"}, - {"name":"album_name", "type":"AMAZON.MusicAlbum"} - ] - }, - { - "intent": "GeeMusicPlayPlaylistIntent", - "slots": [ - {"name":"playlist_name", "type":"AMAZON.MusicPlaylist"} - ] - }, - { - "intent": "GeeMusicQueueSongIntent", - "slots": [ - {"name":"song_name", "type":"AMAZON.MusicRecording"}, - {"name":"artist_name", "type":"AMAZON.MusicGroup"} - ] - }, - { - "intent":"GeeMusicListAllAlbumsIntent", - "slots": [ - {"name": "artist_name", "type":"AMAZON.MusicGroup"} - ] - }, - { - "intent":"GeeMusicListLatestAlbumIntent", - "slots": [ - {"name": "artist_name", "type":"AMAZON.MusicGroup"} - ] - }, - { - "intent":"GeeMusicPlayLatestAlbumIntent", - "slots": [ - {"name": "artist_name", "type":"AMAZON.MusicGroup"} - ] - }, - { - "intent":"GeeMusicPlayAlbumByArtistIntent", - "slots": [ - {"name": "artist_name", "type":"AMAZON.MusicGroup"} - ] - }, - { - "intent":"GeeMusicSkipTo", - "slots": [ - {"name":"song_name", "type":"AMAZON.MusicRecording"}, - {"name":"artist_name", "type":"AMAZON.MusicGroup"} - ] - }, - { - "intent": "GeeMusicPlayIFLRadioIntent" - }, - { - "intent": "GeeMusicPlayLibraryIntent" - }, - { - "intent": "GeeMusicCurrentlyPlayingIntent" - }, - { - "intent": "GeeMusicRestartTracksIntent" - }, - { - "intent": "GeeMusicThumbsUpIntent" - }, - { - "intent": "GeeMusicPlayThumbsUpIntent" - }, - { - "intent": "GeeMusicThumbsDownIntent" - }, - { - "intent": "GeeMusicListAllPlaylists" - }, - { - "intent": "GeeMusicPlayDifferentAlbumIntent" - }, - { - "intent": "AMAZON.ShuffleOnIntent" - }, - { - "intent": "AMAZON.ShuffleOffIntent" - }, - { - "intent": "AMAZON.LoopOnIntent" - }, - { - "intent": "AMAZON.LoopOffIntent" - }, - { - "intent": "AMAZON.HelpIntent" - } - ] -} diff --git a/speech_assets/interactionModel.json b/speech_assets/interactionModel.json new file mode 100644 index 0000000..d84adae --- /dev/null +++ b/speech_assets/interactionModel.json @@ -0,0 +1,377 @@ +{ + "languageModel": { + "invocationName": "gee music", + "intents": [ + { + "name": "AMAZON.PauseIntent", + "slots": [], + "samples": [] + }, + { + "name": "AMAZON.CancelIntent", + "slots": [], + "samples": [] + }, + { + "name": "AMAZON.StopIntent", + "slots": [], + "samples": [] + }, + { + "name": "AMAZON.ResumeIntent", + "slots": [], + "samples": [] + }, + { + "name": "AMAZON.NextIntent", + "slots": [], + "samples": [] + }, + { + "name": "AMAZON.PreviousIntent", + "slots": [], + "samples": [] + }, + { + "name": "AMAZON.ShuffleOnIntent", + "slots": [], + "samples": [] + }, + { + "name": "AMAZON.ShuffleOffIntent", + "slots": [], + "samples": [] + }, + { + "name": "AMAZON.LoopOnIntent", + "slots": [], + "samples": [] + }, + { + "name": "AMAZON.LoopOffIntent", + "slots": [], + "samples": [] + }, + { + "name": "AMAZON.HelpIntent", + "slots": [], + "samples": [] + }, + { + "name": "GeeMusicPlayArtistIntent", + "slots": [ + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + } + ], + "samples": [ + "Play artist {artist_name}", + "Play songs by {artist_name}", + "Play top songs by {artist_name}", + "Play top tracks by {artist_name}", + "Play music by {artist_name}", + "Play tracks by {artist_name}" + ] + }, + { + "name": "GeeMusicPlayAlbumIntent", + "slots": [ + { + "name": "album_name", + "type": "AMAZON.MusicAlbum" + }, + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + } + ], + "samples": [ + "Play the album {album_name}", + "Play album {album_name}", + "Play the album {album_name} by {artist_name}", + "Play album {album_name} by {artist_name}", + "Play songs from the album {album_name} by {artist_name}" + ] + }, + { + "name": "GeeMusicPlaySimilarSongsRadioIntent", + "slots": [], + "samples": [ + "Play similar songs", + "Play songs like this", + "Start radio with this song" + ] + }, + { + "name": "GeeMusicPlaySongIntent", + "slots": [ + { + "name": "song_name", + "type": "AMAZON.MusicRecording" + }, + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + } + ], + "samples": [ + "Play the song {song_name}", + "Play song {song_name}", + "Play the song {song_name} by {artist_name}", + "Play song {song_name} by {artist_name}", + "Play {song_name}", + "Play {song_name} by {artist_name}" + ] + }, + { + "name": "GeeMusicPlayArtistRadioIntent", + "slots": [ + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + } + ], + "samples": [ + "Start radio for artist {artist_name}", + "Create a radio station for artist {artist_name}", + "Start {artist_name} artist radio", + "Start artist radio for {artist_name}", + "Play artists like {artist_name}" + ] + }, + { + "name": "GeeMusicPlaySongRadioIntent", + "slots": [ + { + "name": "song_name", + "type": "AMAZON.MusicRecording" + }, + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + }, + { + "name": "album_name", + "type": "AMAZON.MusicAlbum" + } + ], + "samples": [ + "Start radio for song {song_name}", + "Create a radio station for song {song_name}", + "Start {song_name} song radio", + "Start song radio for {song_name}", + "Play songs like {song_name}", + "Play songs like {song_name} from {album_name}", + "Play songs like {song_name} by {artist_name}", + "Play songs like {song_name} by {artist_name} from {album_name}" + ] + }, + { + "name": "GeeMusicPlayPlaylistIntent", + "slots": [ + { + "name": "playlist_name", + "type": "AMAZON.MusicPlaylist" + } + ], + "samples": [ + "Play {playlist_name} playlist", + "Playlist {playlist_name}", + "Start playlist {playlist_name}", + "Play songs from my {playlist_name} playlist", + "Play playlist {playlist_name}" + ] + }, + { + "name": "GeeMusicQueueSongIntent", + "slots": [ + { + "name": "song_name", + "type": "AMAZON.MusicRecording" + }, + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + } + ], + "samples": [ + "next play the song {song_name}", + "next play song {song_name}", + "next play the song {song_name} by {artist_name}", + "next play song {song_name} by {artist_name}", + "next play {song_name}", + "next play {song_name} by {artist_name}", + "queue {song_name}", + "queue {song_name} by {artist_name}" + ] + }, + { + "name": "GeeMusicListAllAlbumsIntent", + "slots": [ + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + } + ], + "samples": [ + "List all albums by {artist_name}" + ] + }, + { + "name": "GeeMusicListLatestAlbumIntent", + "slots": [ + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + } + ], + "samples": [ + "List the latest albums by {artist_name}", + "What are latest albums by {artist_name}" + ] + }, + { + "name": "GeeMusicPlayLatestAlbumIntent", + "slots": [ + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + } + ], + "samples": [ + "play the latest album by {artist_name}" + ] + }, + { + "name": "GeeMusicPlayAlbumByArtistIntent", + "slots": [ + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + } + ], + "samples": [ + "Play an album by the band {artist_name}", + "Play an album by artist {artist_name}" + ] + }, + { + "name": "GeeMusicSkipTo", + "slots": [ + { + "name": "song_name", + "type": "AMAZON.MusicRecording" + }, + { + "name": "artist_name", + "type": "AMAZON.MusicGroup" + } + ], + "samples": [ + "Skip to {song_name}", + "Skip to {song_name} by {artist_name}", + "Go to {song_name}", + "Go to {song_name} by {artist_name}", + "Skip to the song {song_name}", + "Skip to the song {song_name} by {artist_name}", + "Jump to {song_name}", + "Jump to {song_name} by {artist_name}" + ] + }, + { + "name": "GeeMusicPlayIFLRadioIntent", + "slots": [], + "samples": [ + "play some music", + "play i'm feeling lucky station", + "play my radio station", + "play my station" + ] + }, + { + "name": "GeeMusicPlayLibraryIntent", + "slots": [], + "samples": [ + "play songs from my library", + "play tracks from my library", + "play my library", + "start playing tracks from my library", + "play songs from library" + ] + }, + { + "name": "GeeMusicCurrentlyPlayingIntent", + "slots": [], + "samples": [ + "What is the current song", + "What is currently playing", + "What is playing right now", + "What song is this", + "What is the name of this song", + "What is this" + ] + }, + { + "name": "GeeMusicRestartTracksIntent", + "slots": [], + "samples": [ + "Restart tracks", + "Restart songs", + "Restart the playlist", + "Reset the playlist to the beginning" + ] + }, + { + "name": "GeeMusicThumbsUpIntent", + "slots": [], + "samples": [ + "up vote", + "up vote this", + "thumbs up this song", + "thumbs up", + "like this song" + ] + }, + { + "name": "GeeMusicPlayThumbsUpIntent", + "slots": [], + "samples": [ + "play promoted songs", + "play up voted songs", + "play thumbs up songs" + ] + }, + { + "name": "GeeMusicThumbsDownIntent", + "slots": [], + "samples": [ + "down vote", + "down vote this", + "thumbs down this song", + "thumbs down", + "dislike this song" + ] + }, + { + "name": "GeeMusicListAllPlaylists", + "slots": [], + "samples": [ + "what playlists do I have", + "list my playlists", + "to list my playlists", + "tell me what playlists are in my library", + "list playlists" + ] + }, + { + "name": "GeeMusicPlayDifferentAlbumIntent", + "slots": [], + "samples": [ + "Play a different album" + ] + } + ], + "types": [] + } +} diff --git a/speech_assets/non_us_custom_slot_version/intentSchema.json b/speech_assets/non_us/intentSchema.json similarity index 100% rename from speech_assets/non_us_custom_slot_version/intentSchema.json rename to speech_assets/non_us/intentSchema.json diff --git a/speech_assets/sampleUtterances.de.txt b/speech_assets/non_us/sampleUtterances.de.txt similarity index 100% rename from speech_assets/sampleUtterances.de.txt rename to speech_assets/non_us/sampleUtterances.de.txt diff --git a/speech_assets/sampleUtterances.ja.txt b/speech_assets/non_us/sampleUtterances.ja.txt similarity index 100% rename from speech_assets/sampleUtterances.ja.txt rename to speech_assets/non_us/sampleUtterances.ja.txt diff --git a/speech_assets/sampleUtterances.txt b/speech_assets/non_us/sampleUtterances.txt similarity index 100% rename from speech_assets/sampleUtterances.txt rename to speech_assets/non_us/sampleUtterances.txt diff --git a/speech_assets/non_us_custom_slot_version/sample_slot_data/MUSICALBUM.txt b/speech_assets/non_us/sample_slot_data/MUSICALBUM.txt similarity index 100% rename from speech_assets/non_us_custom_slot_version/sample_slot_data/MUSICALBUM.txt rename to speech_assets/non_us/sample_slot_data/MUSICALBUM.txt diff --git a/speech_assets/non_us_custom_slot_version/sample_slot_data/MUSICGROUP.txt b/speech_assets/non_us/sample_slot_data/MUSICGROUP.txt similarity index 100% rename from speech_assets/non_us_custom_slot_version/sample_slot_data/MUSICGROUP.txt rename to speech_assets/non_us/sample_slot_data/MUSICGROUP.txt diff --git a/speech_assets/non_us_custom_slot_version/sample_slot_data/MUSICPLAYLIST.txt b/speech_assets/non_us/sample_slot_data/MUSICPLAYLIST.txt similarity index 100% rename from speech_assets/non_us_custom_slot_version/sample_slot_data/MUSICPLAYLIST.txt rename to speech_assets/non_us/sample_slot_data/MUSICPLAYLIST.txt diff --git a/speech_assets/non_us_custom_slot_version/sample_slot_data/MUSICRECORDING.txt b/speech_assets/non_us/sample_slot_data/MUSICRECORDING.txt similarity index 100% rename from speech_assets/non_us_custom_slot_version/sample_slot_data/MUSICRECORDING.txt rename to speech_assets/non_us/sample_slot_data/MUSICRECORDING.txt