arioso.platforms.elevenlabs.adapter#

ElevenLabs Music adapter.

Uses ho.route_to_func to auto-generate the raw callable from the ElevenLabs OpenAPI spec, then handles parameter translation for complex fields like composition_plan.

Classes

Adapter(config)

ElevenLabs Music adapter with OpenAPI-based function generation.

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

Bases: BaseRestAdapter

ElevenLabs Music adapter with OpenAPI-based function generation.

generate(prompt, *, duration=30.0, instrumental=False, model='music_v1', output_format='mp3_44100_128', lyrics='', title='', structure=None, watermark=False, seed=None, **kwargs)[source]#

Generate music using the ElevenLabs Music API.

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

  • duration (float) – Length in seconds (3-600).

  • instrumental (bool) – If True, generate without vocals.

  • model (str) – Model ID.

  • output_format (str) – Output format string (e.g. ‘mp3_44100_128’).

  • lyrics (str) – Custom lyrics text.

  • title (str) – Song title.

  • structure (list) – Song section structure (list of dicts).

  • watermark (bool) – Apply C2PA content watermark.

  • seed (int) – Random seed (streaming endpoint only).

Return type:

Song

Returns:

A Song with audio_bytes populated.