Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Unsloth Studio: return the spoken text from /audio/generate instead of a truncated label (#12386)
Leo Borcherdingabf4cb46806a
diff --git a/studio/backend/routes/inference.py b/studio/backend/routes/inference.pyindex b52fe00c900..1986f820ce4 100644--- a/studio/backend/routes/inference.py+++ b/studio/backend/routes/inference.py@@ -21011,7 +21011,7 @@ async def generate_audio("index": 0,"message": {"role": "assistant",- "content": f'[Generated audio from: "{text[:100]}"]',+ "content": text,},"finish_reason": "stop",}diff --git a/studio/backend/tests/test_openai_audio_speech_route.py b/studio/backend/tests/test_openai_audio_speech_route.pyindex 9a8ad15e18e..8da84c27a5c 100644--- a/studio/backend/tests/test_openai_audio_speech_route.py+++ b/studio/backend/tests/test_openai_audio_speech_route.py@@ -1002,3 +1002,18 @@ def test_an_ordinary_model_id_is_still_recorded_verbatim(monkeypatch):== 400)assert api_monitor.snapshot(include_details = False)[0]["model"] == requested+++def test_audio_generate_answers_with_the_text_the_clip_speaks(monkeypatch):+ """Content is the whole spoken text, not a status label cut at 100 characters."""+ cli, _calls, _saved = _make_client(monkeypatch)+ text = (+ "This sentence is deliberately longer than one hundred characters so that a "+ "truncated label would show it. "+ ) * 2+ resp = cli.post(+ "/v1/audio/generate",+ json = {"model": "default", "messages": [{"role": "user", "content": text}]},+ )+ assert resp.status_code == 200+ assert resp.json()["choices"][0]["message"]["content"] == text