-
-
Notifications
You must be signed in to change notification settings - Fork 20
Music Playback
Ava can serve as a Home Assistant media player, playing music and voice announcements. It also supports Music Assistant integration via Sendspin for multi-room audio sync.
0.5.9+ added a detailed music player with synced lyrics, reorganized media/volume settings, and a Mini player cover ring. 0.6.0 made the progress bar seekable and fixed lyric/progress edge cases. 0.6.2 introduced explicit Volume Follow Rules and unified media overlay pause behavior. 0.6.4 switches the primary lyrics source to LRCLIB, tightens duration/artist matching, and adds pause-recovery for the media overlay.
Ava supports the following audio features:
- Media playback (music, podcasts, etc.)
- TTS voice announcements
- Wake prompt sounds
- Timer sounds
- Music Assistant multi-room sync (via Sendspin)
In Home Assistant, Ava registers as a media player entity:
media_player.your_device_name
| Operation | Description |
|---|---|
| Play | Play media |
| Pause | Pause playback |
| Stop | Stop playback |
| Volume | 0-100% |
| Mute | Enable/disable mute |
service: media_player.play_media target: entity_id: media_player.your_device_name data: media_content_id: "http://example.com/music.mp3" media_content_type: "music"
| Format | Description |
|---|---|
| MP3 | Most common |
| AAC | Apple format |
| OGG | Open source format |
| WAV | Lossless format |
| FLAC | Lossless compressed |
- HTTP/HTTPS URLs
- Local file paths
- Streaming URLs
When playing music, Ava can display beautiful vinyl record style album covers.
- Go to Settings -> Interaction
- Find Media Player
- Turn on Home Assistant Media Controls or Music Assistant Media Controls
Set the Home Assistant media player entity ID for album art:
- Go to Settings -> Interaction -> Media Player
- Find Home Assistant Media Player
- Enter entity ID, e.g.
media_player.xxx - Album art only works when album display is enabled
service: esphome.your_device_name_media_cover data: url: "http://example.com/cover.jpg"
The music overlay offers two styles. Synced lyrics are not shown in the default Minimal style; switch to Full metadata to enable them.
| Style | Description |
|---|---|
| Minimal (default) | Compact album-art presentation. |
| Full metadata | Larger playback metadata, progress and transport controls, plus time-synced lyrics when a matching lyric is available. |
The detailed layout adapts to different screen sizes and orientations. Lyrics follow the current playback position and can be fine-tuned from the player when their timing needs adjustment. Tracks without a lyric match continue to use the normal metadata layout.
Path: Ava Settings → Interaction → Media Player → Media Overlay Style → Full metadata
The Full metadata interface also keeps the display awake during playback, so the screen no longer turns off while viewing lyrics or using media controls (0.6.0).
During Music Assistant / Sendspin playback, the progress bar in the Full metadata interface is directly seekable. Tap any point to jump to that position in the track; the player updates progress and lyrics immediately, then reconciles with the server's confirmed playback position without snapping back or losing lyric alignment.
Known upstream limitation: Ava can send the seek command to Music Assistant / Sendspin, but some upstream versions do not yet return the exact resulting playback position to Ava. In that case, Ava can update its local progress from the user's tap but cannot always confirm the final position with the server. Full reconciliation depends on the upstream protocol interface being completed over time.
Synced lyrics now follow the audio that is actually heard more closely, accounting for Sendspin playout buffering and the user's synchronization offset. Matching adds retries, a fallback query and duration validation to reduce failures and incorrect results caused by network errors, missing artist data or similarly named tracks.
Fixes in 0.6.0: lyrics starting midway after a track change, jumping to the first line after pausing, delayed timing adjustments, and local progress becoming stuck after an upstream seek. Cover and lyric changes also use softer transitions.
LRCLIB is now Ava's primary lyrics source. A request that times out after 5 seconds, returns no useful result, or fails validation automatically falls back to QQ Music; the QQ Music path also performs one short retry when needed.
Matching improvements:
- Track duration and multiple artists are considered more carefully, reducing cases where a different recording with the same title supplies the lyrics
- Known spoken-track and no-lyrics placeholders are filtered out
- A track without artist metadata no longer inherits the previous track's artist
Smoother sync: small one- or two-second progress corrections from the upstream player now use hysteresis, keeping the lyric window from jumping backward and forward around a line boundary. Deliberate, larger seeks still realign the lyrics immediately.
The Mini player control lets the full music interface collapse smoothly into a circular cover ring at the edge of the screen instead of disappearing or occupying the whole display.
- The ring shows album art, playback progress and play/pause state.
- The cover rotates slowly while playing, coasts and returns upright after pausing, and crossfades when the track changes.
- Tap the center to play or pause; tap the rest of the cover to reopen the full player.
- The control can be dragged to a convenient position and remembers its placement across portrait and landscape layouts.
- Track changes, pauses and brief metadata gaps preserve the user's expanded or collapsed state.
- It only fades away after the playback queue is genuinely empty and a grace period has elapsed.
This also completes the last mile between music and the kiosk browser: collapse the full player into the cover ring to reveal weather, shopping lists, radio selectors or other browser pages while playback and essential controls remain available.
Path: Ava Settings → Interaction → Media Player → Mini player control
service: tts.speak target: entity_id: media_player.your_device_name data: message: "Hello, welcome home"
Ava uses the TTS engine configured in Home Assistant. Recommended:
- Piper (local, fast)
- Google TTS (online, good quality)
- Azure TTS (online, good quality)
service: media_player.volume_set target: entity_id: media_player.your_device_name data: volume_level: 0.8 # 0.0 - 1.0
service: media_player.volume_mute target: entity_id: media_player.your_device_name data: is_volume_muted: true
Volume synchronization now provides three explicit, mutually exclusive modes:
| Mode | Key | Behavior |
|---|---|---|
| Independent | independent |
Device and Home Assistant volumes are adjusted separately. Default for new installations. |
| Follow device | follow_device |
Changes made with the device volume keys are sent to Home Assistant. |
| Follow Home Assistant | follow_ha |
Volume changes in Home Assistant are applied to the device. |
Only one follow direction can be active at a time, preventing the device and Home Assistant from repeatedly overriding each other. Existing users who enabled the previous volume-key synchronization option are migrated to Follow device.
The same setting is available on the device and in the Ava Fleet console.
Path: Ava Settings → Interaction → Media Player → Volume Follow Rule
The previous Sync with volume keys option (0.5.9) and the older Device Volume / Software Volume mode selector (removed in 0.5.9) are both superseded by this rule. The legacy boolean
syncDeviceVolumeWithHais migrated automatically whenvolumeFollowRuleis still blank.
The Home Assistant media player and Sendspin now share the same pause behavior.
- About 10 seconds after playback is paused, an expanded mini player collapses into its floating button; if playback remains paused, it is then hidden temporarily.
- When the mini player is disabled, the full overlay hides after the same initial delay.
- Repeated paused states no longer keep resetting the timer.
- Resuming playback immediately cancels the hide task and restores the previous title, artwork, progress, and floating-button position.
- Fade transitions now run on the Compose drawing layer, improving reliability on vendor systems where View alpha animations were inconsistent.
The media overlay no longer gets caught between a paused state and its idle timer.
- In minimal mode with the floating button disabled, pausing playback now fades the overlay out after 20 seconds
- If the upstream player is still not ready to resume 10 seconds later, Ava clears stale title/artist identity and waits for fresh metadata instead of leaving old media information stuck on screen
- With the floating button enabled, or when using the detailed player, the established 10-second pause behavior is unchanged
- Resuming playback cancels the pending cleanup
Display text content of voice conversations as a floating window.
- Go to Settings -> Interaction
- Turn on Floating Subtitle switch
Ava supports Music Assistant for multi-room audio sync via the Sendspin protocol. See Sendspin for detailed setup.
| Setting | Description |
|---|---|
| Music Assistant Media Controls | Show music controls during Music Assistant playback |
| Sendspin Optimization Mode | Recommended for low-memory devices |
| Sendspin Sync Offset | Fine-tune playback timing in milliseconds |
| Sendspin Audio Format | Audio codec and quality |
| Sendspin Device Name | Name shown on Music Assistant server |
| Volume Follow Rule | Independent / Follow device / Follow HA (see Volume Follow Rules) |
The previous Device Volume / Software Volume selector was removed in 0.5.9. Ava now uses one consistent device media-volume path for Music Assistant and physical volume keys. The previous Sync with volume keys option (0.5.9) was replaced by the three-way Volume Follow Rule in 0.6.2.
| Setting | Location | Description | Default |
|---|---|---|---|
| HA Media Player | Interaction -> Media Player | Entity ID for album art | - |
| HA Media Controls | Interaction -> Media Player | Show music controls | Off |
| Music Assistant Media Controls | Interaction -> Media Player | Show MA music controls | Off |
| Media Overlay Style | Interaction -> Media Player | Minimal / Full metadata (synced lyrics) | Minimal |
| Mini player control | Interaction -> Media Player | Collapse full player into cover ring | Off |
| Volume Follow Rule | Interaction -> Media Player | Independent / Follow device / Follow HA | Independent |
| Floating Subtitle | Interaction | Show conversation text | Off |
service: media_player.play_media target: entity_id: media_player.your_device_name data: media_content_id: "http://example.com/music.mp3" media_content_type: "music"
service: media_player.media_pause target: entity_id: media_player.your_device_name
service: media_player.media_play target: entity_id: media_player.your_device_name
service: media_player.media_stop target: entity_id: media_player.your_device_name
service: media_player.volume_set target: entity_id: media_player.your_device_name data: volume_level: 0.8
- Check if URL is accessible
- Check if audio format is supported
- Check if volume is muted
- Check Home Assistant connection
- Check if Media Controls is enabled
- Check if HA Media Player entity ID is set correctly
- Check network connection
- Try manually setting cover URL
- Increase volume in Ava settings
- Increase device system volume
- Check if mute is enabled
See Sendspin for multi-room sync configuration. Adjust Sendspin Sync Offset in Settings -> Extensions -> Media Player.
Back to Home
- Quick-Start
- System-Requirements
- Voice-Control
- Chorus-Wake
- ESPHome-Encryption
- HA-Direct-Connection
- Browser
- Screensaver
- Floating-Windows
- Home-Launcher
- Home-Screen-Widgets
- Notification-Scenes
- Quick-Entity
- Sensors
- Backup
- Sendspin
- Bluetooth
- Voice-Messages-Calls
- Music-Playback
- Camera
- Screen-Control
- Intent-Launcher
- ADB-Commands
- Mod-Store
- Ava-Fleet