arioso.platforms.yue.adapter#
YuE adapter supporting fal.ai REST API and local CLI backends.
Classes
|
YuE adapter with dual backend support. |
- class arioso.platforms.yue.adapter.Adapter(config)[source]#
Bases:
objectYuE adapter with dual backend support.
Prefers the fal.ai hosted API when
FAL_KEYis set. Falls back to local subprocess invocation ofinfer.pyotherwise.- generate(prompt, *, lyrics='', duration=30.0, model='m-a-p/YuE-s1-7B-anneal-en-cot', batch_size=4, max_tokens=3000, repetition_penalty=1.1, audio_input='', **kwargs)[source]#
Generate music from genre description and lyrics.
- Parameters:
prompt (
str) – Genre/style description (mapped togenre_txt).lyrics (
str) – Lyrics text (mapped tolyrics_txt).duration (
float) – Desired length in seconds (converted to segments).model (
str) – Stage-1 model identifier.batch_size (
int) – Stage-2 batch size.max_tokens (
int) – Maximum new tokens for generation.repetition_penalty (
float) – Token repetition penalty.audio_input (
str) – Path to a vocal track prompt file, if any.
- Return type:
- Returns:
A Song with audio_url or audio_bytes populated.