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")
# Every platform with its access type and weights licence
arioso.platform_table()
# The parameters a platform accepts, as JSON Schema (common + its extras)
arioso.param_schema("sunoapi")
# Cover every song in a folder (lyrics kept, takes saved, resumable)
arioso.cover_folder("~/songs", "~/covers", platform="sunoapi")
# 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")
Module Attributes
Affordances that carry caller-supplied input audio (used by |
|
The config fields |
Functions
|
Check the current status of a pending Song and return updated Songs. |
|
Transform existing audio into AI-enhanced audio (pipeline stage 3->4). |
|
Download the audio bytes for a Song that has an audio_url. |
|
Generate music using the specified platform. |
|
Generate music, returning all results (some platforms return multiple). |
|
Get configuration info for a platform. |
Return names of all available platforms. |
|
|
One row per platform: its access type, weights licence and commercial use. |
|
Whether platform can condition on caller-supplied input audio. |
- arioso.AUDIO_INPUT_AFFORDANCES = ('audio_input', 'melody', 'reference_audio')#
Affordances that carry caller-supplied input audio (used by
enhance()). Distinct from the clip-extension affordancecontinue_from, which extends a track rather than conditioning on one (a prior generation’s id/URL on hosted platforms, the audio itself on musicgen).
- arioso.PLATFORM_TABLE_FIELDS = ('name', 'access_type', 'weights_license', 'commercial_use')#
The config fields
platform_table()reports, in column order.
- arioso.check_status(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 (
Song) – A Song object (typically with status=’pending’).- Return type:
- 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.enhance(audio, prompt='', *, platform='stable_audio', strength=None, as_='auto', **kwargs)[source]#
Transform existing audio into AI-enhanced audio (pipeline stage 3->4).
Progressive-disclosure sugar over
generate(): routes audio into the platform’s audio-conditioning affordance and generates. This is the entry point for the “rendered MIDI audio -> AI-enhanced audio” step.- Parameters:
audio – The input audio to transform – a
Song,AudioResult,bytes, a file path, an(array, sample_rate)pair, or a NumPy waveform (normalized byarioso._audio.to_audio_ref).prompt (
str) – Optional text guiding the transformation.platform (
str) – An audio-capable platform (default'stable_audio'); verify withsupports_audio_input().strength (
float) – How much the input audio influences the output (0-1: 0 leaves it to the prompt, 1 follows the audio closely), where the platform supports it. The direction is the same on every platform. (Note:stable_audiovia diffusers has no strength knob and will warn if one is passed.)as_ (
str) – Which affordance to route audio into –'auto'(default; picksaudio_input>melody>reference_audio) or an explicit affordance name fromAUDIO_INPUT_AFFORDANCES.**kwargs – Further unified affordance parameters (duration, seed, …).
- Return type:
- Returns:
A
Songwith the enhanced audio.
Example:
rendered = ... # a Song from a score2audio render better = arioso.enhance(rendered, "warm analog studio band")
- arioso.fetch_audio(song)[source]#
Download the audio bytes for a Song that has an audio_url.
- Parameters:
song (
Song) – A Song with a populated audio_url (status=’complete’).- Return type:
- 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, *, platform='musicgen', **kwargs)[source]#
Generate music using the specified platform.
- Parameters:
- Return type:
- Returns:
A Song object containing the generated audio and metadata.
Example:
song = generate("upbeat jazz piano", platform="musicgen", duration=10)
- arioso.generate_many(prompt, *, platform='musicgen', **kwargs)[source]#
Generate music, returning all results (some platforms return multiple).
Same interface as
generate()but always returns a list.
- arioso.platform_table(*, fields=('name', 'access_type', 'weights_license', 'commercial_use'))[source]#
One row per platform: its access type, weights licence and commercial use.
Reads the platforms’ configs only, so no adapter (and no optional dependency) is loaded.
commercial_useis one ofCOMMERCIAL_USE_VALUES.- Parameters:
fields – The config keys each row carries (a missing key reads
None).- Return type:
- Returns:
A list of dicts, one per platform, keyed by
fields.
Example:
free = [r["name"] for r in arioso.platform_table() if r["commercial_use"] == "yes"]
- arioso.supports_audio_input(platform)[source]#
Whether platform can condition on caller-supplied input audio.
Returns True if the platform declares any of
AUDIO_INPUT_AFFORDANCES(audio_input/melody/reference_audio) in its config’ssupported_affordances.Example:
arioso.supports_audio_input("stable_audio") # True arioso.supports_audio_input("mubert") # False
- Return type:
Modules
Core types and constants for arioso. |
|
The functions behind the |
|
Is a take a cover of its source? Lyric recall when there are words, melody rank otherwise. |
|
Compare platforms on the same prompts: time, memory and objective checks, as records. |
|
Cover every song in a folder: lyrics, one cover call per song, every take saved, resumable. |
|
Named prompts: a ledger of (name, prompt_text) pairs organized by category. |
|
Platform packages for arioso. |
|
Platform registry with auto-discovery and lazy loading. |
|
Machine-readable parameter schemas: what each platform accepts, as JSON Schema. |
|
Lazy mapping of platform names to |
|
High-level tools for common arioso workflows (submit, poll, download). |
|
Parameter translation layer. |