arioso
Arioso - Unified facade for AI music generation platforms.
Usage:
import arioso
# Generate with the default platform (musicgen)
song = arioso.generate("upbeat jazz piano", duration=10)
# Generate with a specific platform
song = arioso.generate("epic orchestral", platform="elevenlabs", duration=30)
# List available platforms
arioso.list_platforms() # ['musicgen', 'sunoapi', 'elevenlabs', ...]
# Get platform config
arioso.get_platform_info("musicgen")
# Rich platform access via services
s = arioso.services.sunoapi
s.generate("jazz piano", duration=30) # unified names
s.native_generate("jazz", genre="jazz") # native names
s.upload_file("/path/to/audio.mp3") # platform-specific
# Cross-platform slices
arioso.generators["sunoapi"]("jazz")
arioso.generators.sunoapi("jazz")
- arioso.check_status(song: Song) list[Song][source]
Check the current status of a pending Song and return updated Songs.
For platforms that use async/callback-based generation (like sunoapi), this polls the platform’s status endpoint to get the latest state, including audio URLs once generation is complete.
- Parameters:
song – A Song object (typically with status=’pending’).
- Returns:
List of updated Song objects with current status and audio URLs.
Example:
songs = arioso.generate_many("reggae", platform="sunoapi", ...) # ... wait a bit ... updated = arioso.check_status(songs[0]) if updated[0].status == "complete": print(updated[0].audio_url)
- arioso.fetch_audio(song: Song) Song[source]
Download the audio bytes for a Song that has an audio_url.
- Parameters:
song – A Song with a populated audio_url (status=’complete’).
- Returns:
A new Song with audio_bytes populated.
Example:
updated = arioso.check_status(song) if updated[0].status == "complete": song_with_audio = arioso.fetch_audio(updated[0]) # song_with_audio.audio_bytes is now the raw MP3 data
- arioso.generate(prompt: str, *, platform: str = 'musicgen', **kwargs) Song[source]
Generate music using the specified platform.
- Parameters:
prompt – Text description of desired music.
platform – Name of the generation platform (default: ‘musicgen’).
**kwargs – Parameters using unified affordance names. See
arioso.base.AFFORDANCESfor the full list.
- Returns:
A Song object containing the generated audio and metadata.
Example:
song = generate("upbeat jazz piano", platform="musicgen", duration=10)
- arioso.generate_many(prompt: str, *, platform: str = 'musicgen', **kwargs) list[Song][source]
Generate music, returning all results (some platforms return multiple).
Same interface as
generate()but always returns a list.