Jump to content

Alexa - Distinguish Audiobook from Music in results of 'Play Song'


Recommended Posts

ginjaninja
Posted

I used a command "Play song 'XYZ'" and some tracks from an audiobook library were returned as potential matches.

Might it be possible to reduce the chance of returning undesirable tracks by restricting results of command "play song" to music [libraries]?

Spoiler

I guess the downside is that people might need to have dedicated Music / Audiobook libraries to ensure Emby recognised the different media types; but given the sense that users often expect different behaviours for these 2 media types maybe that is no bad thing that users were required (or at least recommended) to conform (for optimum Alexa support).

"Play chapter"? could be the other side of the coin.(but  perhaps more likely 'Play/Continue Audiobook' would be a more meaningful useful interaction, less prone to undesirable outcome)

"play track" could be a generic command if such a fallback position were required.

thanks for considering.

PS not sure whether im getting better at knowing what will work or the skill is improving but im finding Emby Alexa is getting more reliable at finding the correct track recently. (testing on beta)

  • 1 year later...
ginjaninja
Posted
5 hours ago, Luke said:

@ginjaninja can you please give this another try? Thanks.

sure what has changed / what am i testing?

on 4.9.1.1

whether audio book tracks are excluded from "play song" command? then no


 

  • 2 months later...
Posted
Quote

I used a command "Play song 'XYZ'" and some tracks from an audiobook library were returned as potential matches

@ginjaninjawhat is the resulting queries that you see in the log? Thanks.

ginjaninja
Posted (edited)
On 17/08/2025 at 20:50, Luke said:

@ginjaninjawhat is the resulting queries that you see in the log? Thanks.

HI @Luke

4.9.1.21

ALEXA ASK M.B.HOME PLAY SONG STOLEN PART 2

GET https://‌‍‍XXX.XXX.XX:8920/emby/Users/6cc6d0fa039849af8147592f5da46188/Items?SortBy=ParentIndexNumber,IndexNumber,SortName&IncludeItemTypes=Audio&Recursive=true&SearchTerm=stolen part 2

returns a track/mediaitem in an audiobook library.

Audio itemtype is included....tracks in audiobook library have itemtype audio..seems straight forward what the cause is...

I imagine either audiobook tracks/emby would need a secondary type (music vs audiobook) which could be excluded from the search query for play song action or a different primary type introduced for audiobooks? (strategic/very hard)

 

or maybe a setting in the skill/server that limits what libraries the skill can access with action keywords play song..(tactical/a bit easier maybe..i think i saw a change notice that the api now support a library filter if im not imagining things)

 

 

{
  "Items": [
    {
      "Name": "Stolen, Part 2",
      "ServerId": "fccaa6f897f140dbb689938224ae1938",
      "Id": "321772",
      "SupportsResume": true,
      "RunTimeTicks": 2348930610,
      "IndexNumber": 2,
      "ParentIndexNumber": 1,
      "IsFolder": false,
      "Type": "Audio",
      "ParentBackdropItemId": "328379",
      "ParentBackdropImageTags": [
        "ec273d5dbc310d4e0694027fb1cea770"
      ],
      "Artists": [
        "The Mighty Boosh"
      ],
      "ArtistItems": [
        {
          "Name": "The Mighty Boosh",
          "Id": "328379"
        }
      ],
      "Composers": [],
      "Album": "The Complete Radio Series",
      "AlbumId": "328380",
      "AlbumPrimaryImageTag": "f70b8194ed25eb69aa7228793d8394ad",
      "AlbumArtist": "The Mighty Boosh",
      "AlbumArtists": [
        {
          "Name": "The Mighty Boosh",
          "Id": "328379"
        }
      ],
      "ImageTags": {},
      "BackdropImageTags": [],
      "MediaType": "Audio"
    }
  ],
  "TotalRecordCount": 1
}
Response headers

 

Edited by ginjaninja

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...