songbird-lyria
AI music generation via Google’s Gemini APIs — both real-time streaming and REST.What it owns
Lyria RealTime (WebSocket, streaming)
GeminiClient— WebSocket client speaking the Gemini Live protocol.CircularAudioBuffer— circular buffer with resampling for streaming generated audio into the engine at the host sample rate.LyriaPlugin— high-level orchestrator that sits behind thelyriachannel in the sync engine.
Lyria 3 (REST, non-streaming)
lyria3module — HTTP client for the GeminigenerateContentAPI.Lyria3Model— enum for Clip (30s) and Pro (full-length) models.Lyria3Request/Lyria3Response— request parameters and parsed audio response.
Public API
GeminiClient,GeminiEvent,CircularAudioBuffer,LyriaPlugin, plus thetypesmodule.Lyria3Model,Lyria3Request,Lyria3Responsefrom thelyria3module.
How it fits
- Lyria RealTime: Used by
songbird-app(Tauri command path) to expose streaming Lyria generation. Talks to Gemini over WebSocket viatokio-tungstenite. - Lyria 3: Used by
songbird-sync(ai.generate_lyria3command handler) for one-shot audio generation. Talks to Gemini REST API viareqwest.
Tests
cargo test -p songbird-lyria. Network-touching tests should be #[ignore]d by default.