arioso.platforms.lyria_rt.adapter#
Google Lyria RealTime adapter using the google-genai SDK.
Classes
|
Lyria RealTime adapter using streaming music sessions. |
- class arioso.platforms.lyria_rt.adapter.Adapter(config)[source]#
Bases:
objectLyria RealTime adapter using streaming music sessions.
Creates a live music session via the
google-genaiSDK, sends a prompt, collects PCM audio chunks for a configurable duration, and returns them as a singleSong.- generate(prompt, *, duration=10.0, bpm=None, key=None, energy=None, brightness=None, guidance=4.0, temperature=1.1, top_k=40, seed=None, prompt_weight=None, **kwargs)[source]#
Generate music using a Lyria RealTime streaming session.
- Parameters:
prompt (
str) – Text description of desired music.duration (
float) – Seconds of audio to collect from the stream.bpm (
int) – Beats per minute (60-200).key (
str) – Musical scale (e.g."C_MAJOR").energy (
float) – Density / energy level (0-1).brightness (
float) – Spectral brightness (0-1).guidance (
float) – Guidance strength (0-6).temperature (
float) – Sampling temperature (0-3).top_k (
int) – Top-k sampling (1-1000).seed (
int) – Random seed for reproducibility (0-2.1B).prompt_weight (
float) – Weight applied to the WeightedPrompt.
- Return type:
- Returns:
A Song with PCM audio bytes at 48 kHz.