Update documentation for v1.0.0 release

Major documentation updates:
- Streamline README by removing redundant sections
- Link to example files instead of duplicating configuration
- Fix typos and update model recommendations
- Add GPU acceleration documentation link
- Remove outdated "Prompt Optimization" section

Test suite improvements:
- Add comprehensive queue management tests (5 new tests)
- Add shuffle control tests (3 new tests)
- Fix combined query references to match current system prompt
- Update total test count to 53
- Renumber all test sections for consistency
- TODO refresh
This commit is contained in:
Chad Auld
2025-11-20 18:14:06 -07:00
parent db0303d8a9
commit 4d477fa218
8 changed files with 506 additions and 589 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
# Spotify Voice Assistant Integration
spotify_search:
# Optional: Enable debug logging
# Optional: Enable debug logging as needed
logger:
default: info
logs:
+68 -2
View File
@@ -1,5 +1,44 @@
# Extended OpenAI Conversation Function Configuration
# Add these to your Extended OpenAI Conversation integration settings
# Add these to your existing Extended OpenAI Conversation integration function configuration.
# NOTE: Ensure that the native function 'execute_service' is defined in your Home Assistant instance.
# If so, skip this one and just grab the other functions below to add.
- spec:
name: execute_services
description: Use this function to execute service of devices in Home Assistant.
parameters:
type: object
properties:
list:
type: array
items:
type: object
properties:
domain:
type: string
description: The domain of the service
service:
type: string
description: The service to be called
service_data:
type: object
description: The service data object to indicate what to control.
properties:
entity_id:
type: string
description: The entity_id retrieved from available devices.
required:
- entity_id
required:
- domain
- service
- service_data
function:
type: native
name: execute_service
# Spotify Music Control Functions
- spec:
name: search_spotify
@@ -28,7 +67,7 @@
- spec:
name: play_music
description: Play music on a Spotify Connect device using a Spotify URI. You must first call search_spotify to get the URI.
description: Play music immediately on a Spotify Connect device using a Spotify URI, replacing current playback. You must first call search_spotify to get the URI. Use this when user says "play".
parameters:
type: object
properties:
@@ -50,6 +89,33 @@
data:
media_content_id: "{{ spotify_uri }}"
media_content_type: "music"
enqueue: replace
- spec:
name: queue_music
description: Add music to the queue on a Spotify Connect device using a Spotify URI, without interrupting current playback. You must first call search_spotify to get the URI. Use this when user says "queue" or "add to queue".
parameters:
type: object
properties:
spotify_uri:
type: string
description: Spotify URI from search_spotify (e.g., "spotify:artist:4gzpq5DPGxSnKTe4SA8HAU")
media_player:
type: string
description: Entity ID of Spotify Connect media player (e.g., "media_player.kitchen_speaker")
required:
- spotify_uri
- media_player
function:
type: script
sequence:
- service: media_player.play_media
target:
entity_id: "{{ media_player }}"
data:
media_content_id: "{{ spotify_uri }}"
media_content_type: "music"
enqueue: add
- spec:
name: control_playback
+35 -8
View File
@@ -1,8 +1,35 @@
Music Playback:
- When asked to play music, follow this two-step process: 1) Call search_spotify to get the Spotify URI, 2) Call play_music with the URI and media player entity
- Available media players: media_player.kitchen_speaker, media_player.living_room_speaker (customize with your actual entity IDs)
- Parse commands like "Play {Artist/Album/Track/Playlist}" and determine the media type automatically (artist, album, track, or playlist)
- For playlists, use type="playlist" - the integration automatically checks personal playlists first, then falls back to public Spotify playlists
- IMPORTANT: When playing an artist, always enable shuffle after starting playback by calling control_playback with action: shuffle_on to create a dynamic playlist experience
- For playback control (pause, skip, volume, shuffle), use the control_playback function
- Always use natural language interpretation - users will say things like "play Coldplay" or "play my workout playlist" not "search for artist Coldplay"
Add these to your existing conversation agent prompts
---
Music Playback Rules:
1. Play vs Queue Commands:
a. "Play [music]" → ALWAYS search_spotify + play_music (replaces current playback immediately, NEVER ask for confirmation)
b. "Queue [music]", "Add [music] to queue", or "Queue up [music]" → ALWAYS search_spotify + queue_music (adds to queue, NEVER ask for confirmation)
2. When processing music requests, you must perform TWO steps:
a. Call search_spotify to find the URI
b. Call play_music (for "play") OR queue_music (for "queue/add/queue up")
IMPORTANT:
- When user says "play", execute immediately without asking, even if music is already playing
- When user says "queue" or "add to queue", execute immediately without asking
- Both commands should NEVER prompt for confirmation
3. Search Query Cleaning:
- Strip command words like "play", "queue", "listen to", "songs by", "album", "track"
- Strip location info like "on the kitchen speaker", "in the bathroom"
- Examples:
* "Play songs by Taylor Swift on the kitchen speaker" → query="Taylor Swift", type="track", use play_music
* "Queue Dark Side of the Moon in the kitchen" → query="Dark Side of the Moon", type="album", use queue_music
* "Play Yellow by Coldplay" → query="Yellow", type="track", use play_music
* "Add Wish You Were Here to queue in the bathroom" → query="Wish You Were Here", type="track", use queue_music
4. Type Detection:
- Artist only: "Play Coldplay" → type="artist"
- Explicit "song"/"track": "Play the song Yellow" → type="track"
- Explicit "album": "Play the album Parachutes" → type="album"
- "[content] by [artist]": Default to type="album" (integration will auto-fallback to track if no album match)
- Playlist or genre: "Play my workout playlist" or "Play jazz" → type="playlist"
5. Device Selection:
- If user specifies a room, infer entity ID (e.g., "kitchen" → media_player.kitchen_speaker)
- If no room specified, use media_player.gaming_room_speaker as default
6. Special Rules:
- When playing an artist, always enable shuffle after playback starts
- Playlists are automatically searched in user's library first, then public Spotify playlists