Voice Request
An album played because someone asked for it out loud: “play Aerosmith’s first album”, and it plays (ADR-0042). It is in development: one device listens so far, and it sits wherever it is being worked on. Ears are meant to be on several devices throughout the house, or on one carried from room to room.
Components
- The ears: a reSpeaker Lite running EdS’s own firmware (ADR-0043). Its XMOS chip cleans up what the room says; its XIAO ESP32-S3 listens for the wake word, keeps what follows, and sends it.
scribe, on the services workload: a WAV in, words out, with faster-whisper. It knows nothing of music, aspaletteknows nothing of it.voiced, on the services workload: reads the words against a short grammar, counts an artist’s albums when a place is named, chooses from the owner’s library, and sendsplay_album.- The library index: what the owner’s iTunes library holds (artist, album, year, tracks), made from its XML and never committed (ADR-0046).
Outside services
Speech is written down on EdS’s own workload, not by an outside service. One is asked. Every call to one is counted, a minute at a time, on the Outside Services dashboard (ADR-0027).
| Service | Asked by | For |
|---|---|---|
| MusicBrainz | voiced | counting an artist’s studio albums, when an album is asked for by its place |
A request, from the word to the music
The ears wake
The ears listen for their wake word on the device itself, and send nothing
until they hear it. When they do, they say so on eds/voice/<id>/woken,
and keep what follows until the speaker stops, at most six seconds.
The music is turned down
On woken, voiced sends duck to whatever is current, and iTunes goes to
a quarter of its volume while the request is heard. It comes back on
unduck, once the request is answered, or by itself after ten seconds
(ADR-0044).
The request is sent and written down
The ears send the request as one WAV, 16 kHz mono, on
eds/voice/<id>/utterance, never retained. voiced hands it to scribe
over HTTP and gets back words.
The words become an album
voiced reads the words with a short grammar: “play X’s first album”,
“play the Nth album by X”, “play ALBUM by X”.
- An album named by its place is counted among the artist’s studio albums in MusicBrainz (ADR-0041). If the owner does not have that one, the next of the artist’s albums that the library does have is played (ADR-0045).
- With the library indexed, the nearest artist and album it holds are chosen, so the request names titles iTunes has.
- Words that are not a request are said back as not understood. Nothing nearer is guessed.
The album plays
voiced publishes play_album to eds/nowplaying/command, like any
controller. nowplayd passes it to iTunes, whatever is current
(ADR-0040),
and the iTunes driver plays the album by name. A miss is a failed command,
never a nearer guess.
voiced says what it made of the request on eds/voice/<id>/heard, and the
ears answer with their light: one long flash for an album asked for, three
short for not understood.
What leaves the house
The wake word is heard on the ears; nothing is sent before it. The request goes to EdS’s own workload and is written down there, not by someone else’s service, and none of it is kept. What reaches MusicBrainz is an artist’s name, to count their albums.