arioso.platforms.lyria2.adapter#

Google Lyria 2 adapter.

Uses the google-cloud-aiplatform SDK when available, falling back to raw REST calls against the Vertex AI prediction endpoint.

Classes

Adapter(config)

Google Lyria 2 adapter with SDK-first, REST-fallback strategy.

class arioso.platforms.lyria2.adapter.Adapter(config)[source]#

Bases: BaseRestAdapter

Google Lyria 2 adapter with SDK-first, REST-fallback strategy.

generate(prompt, *, negative_prompt='', seed=None, model='lyria-002', batch_size=1, **kwargs)[source]#

Generate music using Google Lyria 2.

Parameters:
  • prompt (str) – Text description of desired music.

  • negative_prompt (str) – Elements to avoid in the generation.

  • seed (int) – Random seed for reproducibility.

  • model (str) – Model version identifier.

  • batch_size (int) – Number of samples to generate.

Return type:

Song

Returns:

A Song with WAV audio bytes (fixed 30 s duration at 48 kHz).