Skip to content

Matching and aliases

Alexa hands Encore what it heard, such as “rocky two” or “the avengers end game”. Encore matches that against an in-memory index of your library rather than relying on Alexa alone, so it copes with spelling, numbering and titles Alexa has never heard of.

  1. Normalise. Both the request and every title are folded the same way: case and accents removed, punctuation and leading articles dropped, initials joined (“E.T.” becomes “et”), and numbers made consistent: roman numerals after a word, number words, ordinals and spoken years become digits (“rocky second” is “rocky 2”, “nineteen eighty four” is “1984”), and “part” or “chapter” before a number is dropped. English, German, French, Spanish and Italian each have their own articles and number words.
  2. Aliases. Every title also answers to variants: roman numerals converted (“Rocky V” is “rocky 5”), German umlauts spelt out, and shortenings that drop or keep only a subtitle (“Dune: Part Two” is also “Dune”, “Avengers: Endgame” also “Endgame”). Derived variants score a little lower than the real title. Your own aliases (below) count as the title.
  3. Find candidates with fuzzy word matches, sound-alike matches (Double Metaphone, or Cologne phonetics for German) and, when those find little, character trigrams.
  4. Score each candidate by how well the words, characters and sounds agree. An exact match scores 1. A year at the end of the request (“dune 2021”) is matched against the release year, and numbers must match exactly, so “rocky 2” never plays “Rocky 3”.
  5. Decide. Encore plays the best match when it’s exact and unique, or clearly ahead of the rest. When two or more are close, Alexa asks which one you meant. When nothing scores well enough, Alexa says it couldn’t find it.

The rules for a library follow its Kodi instance’s language (English by default), set in config.

alexa.deep_search (on by default) makes “play X” search music as well as films and TV when the request doesn’t say what kind of title it is.

On the Library page’s match tester, type what Alexa would hear, choose a library and optionally the kinds of title, and see the normalised query, the decision (play, ask or not found), the margin between the top two, and every candidate with a breakdown of its score. It runs against the live index without touching Kodi.

The same page shows each library’s newest titles and whether each one is findable by voice and included in the skill model.

When a title is hard to say or Alexa keeps hearing it differently, give it an alias: another name it should answer to. In the match tester, type the phrase, check that the top result is the title you mean, and choose Add “…” as an alias for the top result; for example “lotr two” for “The Lord of the Rings: The Two Towers”. The library’s aliases are listed on the same page, where you can remove them.

  • Aliases work for voice requests straight away.
  • On the next deploy they are added to the skill model as synonyms of the title, which helps Alexa recognise them.
  • An alias belongs to a library, so instances that share a library share their aliases.

Rooms have aliases too; see Echo devices and rooms.

When Encore deploys the skill, your library’s titles, rooms, playlists, genres and music videos become slot values, each title with its aliases as synonyms. Amazon limits each interaction model to 1.5 MB, so Encore includes the most recently added or played titles of each kind up to a limit. Titles that don’t fit can still be found by voice, because Encore’s matcher always searches the whole library.