arioso.base#
Core types and constants for arioso.
Defines the unified output types (Song, AudioResult) and the canonical set of affordance names that all platform adapters map to.
Classes
|
Descriptor for a unified parameter affordance. |
|
Unified audio output from any music generation platform. |
|
A generated song with its metadata and audio data. |
- class arioso.base.Affordance(name, type, description, default=None)[source]#
Bases:
objectDescriptor for a unified parameter affordance.
- name#
Canonical parameter name used at the facade level.
- type#
Expected Python type.
- description#
Human-readable description.
- default#
Default value (None means no default / required).
- class arioso.base.AudioResult(audio_bytes=None, audio_url='', audio_array=None, sample_rate=0, format='', duration_seconds=0.0)[source]#
Bases:
objectUnified audio output from any music generation platform.
Exactly one of audio_bytes, audio_url, or audio_array will typically be populated by the platform adapter. Conversion between forms can be done on demand by the caller.
- audio_bytes#
Raw audio file bytes (MP3, WAV, etc.).
- audio_url#
URL to download the audio file.
- audio_array#
Numpy array of audio samples.
- sample_rate#
Sample rate in Hz (e.g. 44100, 32000).
- format#
Audio format string (e.g. “mp3”, “wav”, “pcm”).
- duration_seconds#
Duration of the audio in seconds.
- class arioso.base.Song(id='', title='', status='pending', audio=<factory>, metadata=<factory>, platform='')[source]#
Bases:
objectA generated song with its metadata and audio data.
- id#
Provider-specific identifier for the song.
- title#
Song title (may be auto-generated by the platform).
- status#
Generation status: pending, generating, complete, error.
- audio#
The audio output.
- metadata#
Provider-specific metadata dict.
- platform#
Name of the platform that generated this song.