Skip to content

Studio: add the Clone page, audio inputs and saved voices - #12602

Merged
danielhanchen merged 107 commits into
unslothai:mainfrom
Etherll:feat/studio-audio-clone
Oct 4, 2026
Merged

danielhanchen merged 107 commits into
unslothai:mainfrom
Etherll:feat/studio-audio-clone

Conversation

@Etherll

@Etherll Etherll commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #12600. Only the commits after 320b86b are new in this PR.

The tool panel registry, the workflow bindings, audio_workflows and the last model per page return here with their first consumer, after #12600 dropped them as unused. The generic registry stays because eleven panels share request shaping, option claims and Generate checks.

Summary

Adds a Clone page next to Speak, Music and Transcribe. You give it a reference clip (upload, recording, a clip from history, or a saved voice), say what's said in the clip, and generate speech in that voice. On main, 9 clone-only audio.cpp families were listed as text to speech and failed without reference audio, and MioTTS could not load. With this PR they move to Clone and work, which takes the main-branch TTS harness from 27/41 to 40/41.

Changes

Backend (studio/backend):

  • POST /api/inference/audio/inputs streams an upload to disk (200 MiB cap), decodes it with PyAV (already a dependency) and keeps it per account for 24 hours. At run time a reference is converted to 24 kHz mono and cut to its first 30 s; saved voices keep the same 30 s. /audio/inputs/{id}/transcribe fills in the reference transcript without writing to the transcript gallery.
  • /api/inference/audio/voices (list, create, rename, delete, file) stores saved voices per account.
  • POST /api/inference/audio/run runs a clone from an input id, a history clip or a saved voice. The route resolves ids to account-scoped files and passes the worker absolute paths. Requests that send path or voice_ref themselves get a 422, and an expired or unknown input gets a 404 with "This reference expired. Add it again."
  • AudioCppFamily gains speaks, clone (reference-text policy, tool options, emotion audio, input rate, language names) and companions. Status and load responses carry audio_workflows, audio_reference_text and audio_required_inputs.
  • Clone-only families now list on Clone and are hidden from Speak: Qwen3-TTS Base, Chatterbox (non-Turbo), CosyVoice3, IndexTTS2, IndexTTS2.5, FireRedTTS3 Base and Instruct, FireRedAudio, Vevo2, Confucius4 and MioTTS. Chatterbox, Echo-TTS, Confucius4 and FireRedTTS3 Base load with the clon server task, which is what the spike found works.
  • MioTTS downloads MioCodec next to it and passes it as miotts.codec_model_path. Picking MioCodec alone now says it is the codec MioTTS loads with.
  • Maya1 returns 400 "Maya1 needs a voice description." without one. VibeVoice text with no Speaker N: line is sent as Speaker 1: <text>.
  • /audio/generate on a clone-only model returns 400 with a pointer to Clone (for example "IndexTTS2 speaks in a voice cloned from a recording. Open Clone and add one.").
  • Qwen3 gets full language names (en becomes English), and clone requests send language at the top level.

Frontend (studio/frontend/src/features/audio):

  • New pages/clone-page.tsx. The rail has the reference card with a waveform and duration, "What's said in the clip" with a Transcribe button, the text to speak, language, and the model's tool panel: Timbre only (Qwen3 Base), Emotion with From text / From audio / Mixer (IndexTTS2), Expressiveness (Chatterbox), Mode with Same language / Cross-lingual / Instruct (CosyVoice3), and Speed and dialect (F5).
  • Save voice keeps a reference for later. Speak can use a saved voice on models that both speak and clone (verified on VoxCPM2).
  • Tool panels now validate and shape the request on Speak and Music too, through tools/panel-logic.ts and audio-run-request.ts.
  • Each page shows the model it last used as not loaded while another model holds the slot.
  • With no capable model loaded, Clone offers recommended clone models as one-click load actions.
  • The Transcribe button prefers an STT model that is already downloaded.

UX

Mapping to the audio pages UX checklist (items 1 to 10):

  1. Fast first result. The Clone empty state and the area under Generate offer recommended clone models as one-click actions. The quant is resolved the same way the picker does it. Qwen3-TTS 0.6B Base loaded in 10.6 s from that action.
  2. No dead ends. Blocked Generate shows the reason inline with an action, for example "Needs a short clip of the voice to copy. Add reference audio" and "This model needs what's said in the clip. Transcribe it or type it". A loaded model that cannot clone is called out on the page.
  3. Never lose work. The Clone draft (reference, transcript, text, language) and tool values per model, workflow and panel persist in unsloth_audio_clone_v1 across page switches and reloads.
  4. Honest progress. Clone uses PR 1's shared run footer and Stop. The reference card shows "Loading the clip…" while it fetches. An inline "Loads X for Clone, about N s" note before a model switch is not added here.
  5. Results first. Clone results go into PR 1's shared output list. The native player and ClipCard rework is deferred (see Known gaps).
  6. Input in one move. The reference card accepts drag and drop on the whole card, file picker, recording, From history and saved voices. The waveform and duration appear right after the pick.
  7. Keyboard. Mod+Enter runs the current page's Generate from any field. Focus moves to the new result and an aria-live region announces completion and errors.
  8. Calm density. Tool panels appear only for the loaded model and use plain labels (Timbre only, Expressiveness, Speed and dialect). Internal option names such as x_vector_only_mode do not appear in the UI.
  9. Actionable errors. Backend reasons reach the page. An expired reference is marked on its card instead of showing a duplicate toast.
  10. Layout integrity. Screenshots cover the rail and stacked layouts, UI size 12 and 20, and light and dark themes. Workflow tabs no longer truncate with 4 tabs. Every screenshot was taken with reduced motion on.

An independent UX reviewer went through the screenshots and listed 20 findings. Fixed: recommended models as one-click actions, the expired-reference card, one-line chips and rail overflow, blocker copy, and the save-dialog hint. The rest are under Known gaps.

Plan findings fixed

These are from the main-branch audio.cpp model run (2026-10-03):

  • Finding 4: clone-only models were offered as text to speech. Chatterbox (non-Turbo), FireRedTTS3 Base and Instruct, Confucius4, CosyVoice3, IndexTTS2, IndexTTS2.5 and Vevo2 now list on Clone only. "FireRedAce" has no family by that name, so this PR treats it as FireRedAudio (firered_audio), which also moves to Clone.
  • Finding 5: MioTTS could not load because Studio did not download MioCodec. MioCodec is now a companion download and session option, and MioTTS clones on GPU.
  • Finding 6: inputs were not enforced. Maya1 requires a voice description, and plain VibeVoice text is sent as Speaker 1: ….

Testing

Frontend, from studio/frontend:

npm test               # 10075 pass, 1 fail (see below)
npm run typecheck      # exit 0
npm run i18n:check     # "All locale overlays pass parity."
npm run build          # exit 0

The one failure is reasoning-source-render hitting its 30 s timeout under load. It passes when run alone, and this PR does not touch that file. Baseline at 89f7893 was 10034/10034.

Backend, from studio/backend (the 30 audio test files from the PR 1 baseline plus the new and touched tests):

python -m pytest -n 8 \
  tests/test_audio_inputs.py tests/test_audio_voices.py tests/test_audio_run_route.py \
  tests/test_audio_cpp_clone_requests.py tests/test_account_media_isolation.py \
  tests/test_gguf_load_cache_reuse.py tests/test_stt_registry.py tests/test_audio_cpp_models.py \
  tests/test_audio_cpp_runtime_status.py tests/test_audio_cpp_server_http.py \
  tests/test_audio_dataset_decode.py tests/test_audio_decode_load_order.py \
  tests/test_audio_detected_columns.py tests/test_audio_device_guards.py \
  tests/test_audio_device_preference.py tests/test_audio_eval_dataset.py \
  tests/test_audio_gallery.py tests/test_audio_lora_logging.py tests/test_audio_probe_target.py \
  tests/test_audio_runtime_errors.py tests/test_audio_sampling_fill.py \
  tests/test_audio_token_detection.py tests/test_audio_tts_cancellation.py \
  tests/test_audio_type_inconclusive.py tests/test_audio_unsupported_backend_error.py \
  tests/test_audio_workflows.py tests/test_chat_input_audio_part.py \
  tests/test_dataset_preview_audio_cells.py tests/test_gguf_tts_audio_type.py \
  tests/test_llama_audio_attachment_container.py tests/test_mlx_worker_audio_commands.py \
  tests/test_native_audio.py tests/test_openai_audio_speech_route.py \
  tests/test_openai_audio_transcriptions_route.py tests/test_openai_audio_upload_bound.py \
  tests/test_pr7699_worker_audio_mirror.py tests/test_whisper_audio_vlm_eval_dataset.py \
  tests/test_gallery_flags.py
# 1045 passed, 3 skipped (baseline at 89f7893: 756 passed, 3 skipped)

ruff check   # all passed

GPU smoke ran on a separate Studio install from this branch (install.sh --local) on one GPU. Each clone used the same reference clip and was checked by transcribing the output with ASR:

Case Model Load Run Output rate ASR matches text
Transcript given Qwen3-TTS 0.6B Base 200 (9.7 s) 200 (1.4 s) 24 kHz yes
Timbre only Qwen3-TTS 0.6B Base 200 200 (0.9 s) 24 kHz yes
No transcript Qwen3-TTS 0.6B Base 200 400 expected refusal
clon task Chatterbox 200 (5.8 s) 200 (13.9 s) 24 kHz yes
Same language CosyVoice3 200 200 (0.9 s) 24 kHz yes
Cross-lingual CosyVoice3 200 200 (0.7 s) 24 kHz yes
Emotion mixer IndexTTS2 200 (14.7 s) 200 (1.5 s) 22.05 kHz yes
Emotion from audio IndexTTS2 200 200 (1.5 s) 22.05 kHz yes
Clone IndexTTS2.5 200 200 (1.1 s) 22.05 kHz yes
48 kHz stereo reference VoxCPM2 200 200 (1.3 s) 48 kHz yes
WebM/Opus reference VoxCPM2 200 200 (1.5 s) 48 kHz yes
Clone Fish Audio S2 Pro 200 200 (2.0 s) 44.1 kHz yes
Clone Confucius4 200 200 (1.6 s) 22.05 kHz yes
Clone FireRedTTS3 Base 200 200 (1.3 s) 24 kHz yes
Clone FireRedTTS3 Instruct 200 200 (1.3 s) 24 kHz yes
Clone FireRedAudio 200 200 (1.3 s) 24 kHz yes
Clone, no transcript Vevo2 200 200 (1.1 s) 24 kHz yes
Clone with MioCodec MioTTS 1.7B 200 (9.0 s) 200 (0.8 s) 44.1 kHz yes

When Vevo2 was given the reference transcript, it spoke the transcript instead of the text. Vevo2's reference text is now marked unused, and the run without it is clean.

Speak and route checks:

Case Result
Maya1 without / with a voice description 400 "Maya1 needs a voice description." / 200, ASR correct
VibeVoice 1.5B and 7B with plain text 200, ASR correct
Kokoro, Chatterbox-Turbo on Speak 200, unchanged
IndexTTS2 on /audio/generate 400, points to Clone
Create, list, delete a saved voice 201 / 200 / 200
Speak in a saved voice on VoxCPM2 200, ASR correct, gallery record has no absolute paths
Transcribe a reference 200
path in an input, top-level voice_ref 422
Unknown input id 404 "This reference expired. Add it again."

Before and after on the main-branch audio.cpp e2e harness: TTS 27/41 before, 40/41 after. The 13 fixed are Chatterbox, Confucius4, CosyVoice3, FireRedAudio, FireRedTTS3 Base and Instruct, IndexTTS2, IndexTTS2.5, Vevo2, MioTTS, Maya1, and VibeVoice 1.5B and 7B. Qwen3-TTS 0.6B Base is also newly offered and works.

Known gaps

  • KugelAudio is still refused by PR 1's runtime-family check, which is the remaining 1/41.
  • F5-TTS was not smoked on GPU because the Habibi GGUF was not in the local cache. Its Speed and dialect panel is covered by unit tests only.
  • There is no trim UI yet. The backend uses the first 30 s of a reference, and the card says "Uses the first 30 s." for a longer clip. Trim is planned for PR 3.
  • There is no Dialogue panel for multi-speaker MOSS-TTSD or VibeVoice yet. Plain VibeVoice text is auto-labelled as Speaker 1.
  • Deferred UX review items (shared output and rail from PR 1, or later PRs): native audio player and ClipCard, Stop button style, footer overlap mask, voice-description field shown on Kokoro, panel titles with "· model", header truncation at UI size 20, and duplicate saved-voice names.
  • PR 1's branch has moved to febd293 (a pre-commit.ci formatting commit) since this branch was cut from 89f7893. It conflicts with this branch in one line of routes/inference.py; the merge will come in with the PR 2 follow-up rather than this build.

Before / after

BEFORE = #12600 head (68d2a90), AFTER = this PR (440d2a0). The refs differ from the merge base on purpose: this PR is stacked on #12600, so the Audio page only exists with that PR in place. Both Studios are fresh installs on one host with the same reference clip (LibriSpeech dummy row 1).

The Audio page with Qwen3-TTS-12Hz-0.6B-Base-GGUF requested. BEFORE refuses to load it ("only clones a reference voice, which Studio does not send yet") and the page menu has Speak, Music and Transcribe. AFTER loads it and shows the Clone page: the reference card with its waveform, the clip's transcript, and the text to speak.

Audio page before and after: Clone page

The same page after Generate. AFTER has the cloned clip in history, tagged with the reference it came from. BEFORE has nothing to generate with.

Audio page before and after: cloned clip in history

Etherll and others added 5 commits October 2, 2026 23:38
Map each audio.cpp family's existing task to the Audio workflow it serves
(speak, music, transcribe) and report it as audio_workflows on inference
status and cached-model rows. Gallery clips record their workflow, older
clips infer it from audio_type, and DELETE /audio/gallery can scope a clear
to one workflow.

Fix the spec-task fallback stopping at a 'clon' token, so a clone+music or
clone+asr spec is no longer refused as clone-only. Only offer a fallback
family the installed runtime knows (its model_specs, or the pinned tag's
spec list), and name unsupported task tokens in plain words.

Pass the audio runtime's own error text, sanitized, to /audio/generate,
/v1/audio/speech and transcription instead of a generic internal error.
The 3,600-line Audio page becomes a thin host over hooks (model slot, STT
sidecar, transcription, gallery, generation, handoff) and per-workflow
pages, with the moved code unchanged. A Zustand workspace store holds the
current workflow; only the page commits it, the sidebar and deep links ask.

- Sidebar: Images' workflow list is generalised; a pinned Audio row lists
  its workflows inline, and the More flyout gets an Audio submenu. Nav
  defaults are unchanged.
- Handoffs: ?workflow= and ?task= (text-to-audio opens Music), Library
  clips open on their own page, the chat picker passes the workflow.
- Each page lists only models for its task, keeps its own history and
  drafts, and tours its own controls. Clear all clears only that page.
- Today's model-specific fields move into a tool-panel registry unchanged.
- Generate says why it is off and offers the fix, runs from Mod+Enter,
  shows elapsed time, keeps a failed run's reason, and focuses the new clip.

The source-shape tests that read audio-page.tsx now read the split files,
with their assertions unchanged.
POST /api/inference/audio/inputs streams an upload to disk, decodes it with
PyAV and keeps it per account for a day. /audio/voices stores saved voices.
/audio/run clones a voice from an upload, a history clip or a saved voice:
the route resolves ids to account-scoped 24 kHz mono files and hands the
worker paths, never bytes or a path the client chose.

Clone-only audio.cpp families (Qwen3-TTS Base, Chatterbox, CosyVoice3,
IndexTTS2/2.5, FireRedTTS3, FireRedAudio, Vevo2, Confucius4, MioTTS) list on
Clone instead of Speak, with the server task the spike found loads (clon for
Chatterbox, Echo-TTS, Confucius4 and FireRedTTS3 Base). MioTTS downloads and
loads MioCodec beside it. Maya1 needs a voice description, and VibeVoice text
without a speaker label is sent as Speaker 1.
Clone joins Speak, Music and Transcribe. Its rail takes a reference by
upload, recording, history clip or saved voice, drawn with a waveform as
soon as it is picked, then "What's said in the clip" with a Transcribe
button, the text, language and the model's tools: Timbre only (Qwen3 Base),
Emotion (IndexTTS2), Expressiveness (Chatterbox), Mode (CosyVoice3) and
Speed and dialect (F5). Save voice keeps a reference for later; Speak can use
a saved voice on models that both speak and clone.

Tool panels now validate and shape the request on Speak and Music too, a page
shows its last model as not loaded, and Clone offers recommended models in
one click.
@Etherll
Etherll requested a review from danielhanchen as a code owner October 3, 2026 08:21
@danielhanchen

Copy link
Copy Markdown
Member

The (Python 3.13, rest) red on head ca6a9bd8 is this PR's: tests/multi_account/test_alice_bob_matrix.py::test_object_route_factory_completeness lists the new per-object audio routes as missing from the per-account object route matrix (routes.inference:DELETE:/audio/inputs/{input_id} routes.inference:DELETE:/audio/voices/{voice_id} routes.inference:PATCH:/audio/voices/{voice_id} routes.inference:POST:/audio/inputs/{input_id}/transcribe ). New object routes need entries there so the cross-account isolation checks cover them; test_account_media_isolation.py in this PR may already exercise them, but the matrix is what the completeness check reads.

danielhanchen and others added 9 commits October 3, 2026 06:57
…model memory

WorkflowBinding, the status audio_workflows field and lastModelByWorkflow had
no reader. The tool panel registry rendered one instruction field through a
generic framework whose request and validation hooks were never called; the
page now renders that field directly from instructionsFieldKind.
The selected clip is a card with its model and age, a waveform player and
the clip menu, which gains Send to. A run in progress shows a pending card
with its phase, elapsed time and Stop. History rows add the model and age.
danielhanchen added a commit to Etherll/unsloth that referenced this pull request Oct 3, 2026
danielhanchen and others added 6 commits October 3, 2026 07:43
An unlisted generated clip now stays on the page that made it instead of
showing on the other TTS page and blocking its history. Switching between
Speak and Music passes the same busy gate as a mode switch, so a load in
flight no longer pulls the page back when it finishes.
Brings in unslothai#12600's pre-commit fixes, comment trims and the move of the
instruction fields to components/instructions-fields.tsx.

unslothai#12600 dropped the tool panel registry, WorkflowBinding, the status
audio_workflows field and lastModelByWorkflow because nothing read them.
The Clone page reads all of them, so they come back here with their first
consumer. The registry renders the instruction fields from their new path,
which leaves instructionsFieldKind without a caller; it goes, and the
tool panel tests keep the copy assertions its test made.
Drop the unused trim support, dead response fields and helpers, merge the two PyAV
decoders into one transcode, share the option matcher between the route and the
backend, fold duplicated tests into tables and cut narration comments.
npm run typecheck failed on the test's row helper, which lacked created_at.
# Conflicts:
#	studio/frontend/src/features/audio/route-search.ts
…y speaks=False family, and count only kept inputs toward the byte cap
@danielhanchen
danielhanchen merged commit 846989d into unslothai:main Oct 4, 2026
danielhanchen added a commit to Etherll/unsloth that referenced this pull request Oct 4, 2026
* Studio: add audio workflow bindings and surface audio runtime errors

Map each audio.cpp family's existing task to the Audio workflow it serves
(speak, music, transcribe) and report it as audio_workflows on inference
status and cached-model rows. Gallery clips record their workflow, older
clips infer it from audio_type, and DELETE /audio/gallery can scope a clear
to one workflow.

Fix the spec-task fallback stopping at a 'clon' token, so a clone+music or
clone+asr spec is no longer refused as clone-only. Only offer a fallback
family the installed runtime knows (its model_specs, or the pinned tag's
spec list), and name unsupported task tokens in plain words.

Pass the audio runtime's own error text, sanitized, to /audio/generate,
/v1/audio/speech and transcription instead of a generic internal error.

* Studio: split Audio into Speak, Music and Transcribe workspaces

The 3,600-line Audio page becomes a thin host over hooks (model slot, STT
sidecar, transcription, gallery, generation, handoff) and per-workflow
pages, with the moved code unchanged. A Zustand workspace store holds the
current workflow; only the page commits it, the sidebar and deep links ask.

- Sidebar: Images' workflow list is generalised; a pinned Audio row lists
  its workflows inline, and the More flyout gets an Audio submenu. Nav
  defaults are unchanged.
- Handoffs: ?workflow= and ?task= (text-to-audio opens Music), Library
  clips open on their own page, the chat picker passes the workflow.
- Each page lists only models for its task, keeps its own history and
  drafts, and tours its own controls. Clear all clears only that page.
- Today's model-specific fields move into a tool-panel registry unchanged.
- Generate says why it is off and offers the fix, runs from Mod+Enter,
  shows elapsed time, keeps a failed run's reason, and focuses the new clip.

The source-shape tests that read audio-page.tsx now read the split files,
with their assertions unchanged.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Studio: add audio inputs, saved voices and the clone run route

POST /api/inference/audio/inputs streams an upload to disk, decodes it with
PyAV and keeps it per account for a day. /audio/voices stores saved voices.
/audio/run clones a voice from an upload, a history clip or a saved voice:
the route resolves ids to account-scoped 24 kHz mono files and hands the
worker paths, never bytes or a path the client chose.

Clone-only audio.cpp families (Qwen3-TTS Base, Chatterbox, CosyVoice3,
IndexTTS2/2.5, FireRedTTS3, FireRedAudio, Vevo2, Confucius4, MioTTS) list on
Clone instead of Speak, with the server task the spike found loads (clon for
Chatterbox, Echo-TTS, Confucius4 and FireRedTTS3 Base). MioTTS downloads and
loads MioCodec beside it. Maya1 needs a voice description, and VibeVoice text
without a speaker label is sent as Speaker 1.

* Studio: add the Clone page with reference inputs and saved voices

Clone joins Speak, Music and Transcribe. Its rail takes a reference by
upload, recording, history clip or saved voice, drawn with a waveform as
soon as it is picked, then "What's said in the clip" with a Transcribe
button, the text, language and the model's tools: Timbre only (Qwen3 Base),
Emotion (IndexTTS2), Expressiveness (Chatterbox), Mode (CosyVoice3) and
Speed and dialect (F5). Save voice keeps a reference for later; Speak can use
a saved voice on models that both speak and clone.

Tool panels now validate and shape the request on Speak and Music too, a page
shows its last model as not loaded, and Clone offers recommended models in
one click.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Studio: add speech edit bindings and the edit run path

Edit speech on DotTTS Edit (markup, one pass), Vevo2 (s2s editing) and
FireRedAudio (one semantic or acoustic instruction per pass, chained).
/audio/run takes the recording by id, refuses sources over 30 s, keeps the
original as a source clip for A/B, and never returns server paths.

* Studio: add the Edit speech page

Recording, auto-transcribed transcript, word diff editor, Words | Delivery
modes, per-model request preview, and an Original | Edited compare player.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Studio audio: drop unused workflow bindings, tool panel registry and model memory

WorkflowBinding, the status audio_workflows field and lastModelByWorkflow had
no reader. The tool panel registry rendered one instruction field through a
generic framework whose request and validation hooks were never called; the
page now renders that field directly from instructionsFieldKind.

* Studio audio edit: slim the backend edit path

* Studio audio: trim comments

* Studio: cover audio input and voice routes in the account route matrix

* Studio Edit: drop the runtime request preview and trim edit logic

* Studio: slim the Edit page UI and trim its comments

* Studio: apply the Audio page filter to local and LM Studio picker rows

* Studio: keep Audio history pins, paging and selection scoped to the page

* Studio: open the chat picker's Audio page when it also sends a model

* Studio: switch Audio pages from a title menu

* Studio: show Audio results as clip cards with a waveform and Send to

The selected clip is a card with its model and age, a waveform player and
the clip menu, which gains Send to. A run in progress shows a pending card
with its phase, elapsed time and Stop. History rows add the model and age.

* Studio: align the Audio footer Stop with Images and keep the rail fade in sync

* Studio Edit: drop the unreachable open-Transcribe blocker and unused fields

* Studio audio: keep unlisted clips and busy switches per workflow

An unlisted generated clip now stays on the page that made it instead of
showing on the other TTS page and blocking its history. Switching between
Speak and Music passes the same busy gate as a mode switch, so a load in
flight no longer pulls the page back when it finishes.

* Studio Edit: tighten the edit tests

* Studio: slim the Clone page layer

Drop the unused trim support, dead response fields and helpers, merge the two PyAV
decoders into one transcode, share the option matcher between the route and the
backend, fold duplicated tests into tables and cut narration comments.

* Studio: type the scoped gallery move test against FlaggableItem

npm run typecheck failed on the test's row helper, which lacked created_at.

* Studio: send clips to Clone and reuse the shared waveform decode

* Studio: trim Clone page comments

* Studio: list every downloaded audio.cpp family's workflows on the umbrella row

* Studio: scope typed Hub search rows to the Audio page's workflow

Search results skipped the page's row filter, so a search on Speak offered
music models and Music offered speech models.

* Studio: filter local model rows by Audio page workflow

Local audio.cpp folders now report their family's workflows like cached rows,
and the picker applies the page filter to LM Studio, models-dir and custom
folder rows, so a clone-only model lists on Clone and not on Speak.

* Studio: put Audio's load device with the model

Load model into moves to the top of the rail, next to the model it applies to.
modelLoadNote phrases the note shown before a run that loads a model first.

* Studio: let Audio history rows truncate the model before the title

* Studio audio.cpp: wait out a slow GPU teardown instead of failing the request

* Studio audio: trim comments on the clip card, waveform and history

* Studio audio: drop stale transcripts and never show an edit's source as its result

* Studio audio: keep the hooks' original formatting

* Studio: clear a deleted saved voice, filter Hub rows by page, auto-detect the reference language

* Studio audio: keep an unsaved clip when another page selects its history

Auto-selecting the other page's first clip, and the next gallery refresh,
both dropped the unsaved fallback, which is the only copy of that clip.

* Studio: keep Audio's Send to from stopping a run and dropping the clip

Sending a clip to Transcribe mid-run stopped the run, but the page stayed busy
until it settled, so the transcription was refused and the clip dropped. Send to
now waits for the running task and says so.

* Studio audio: disown a pending speech pick when switching Speak and Music

A staged download finishing after the switch loaded the old pick and moved
the page back.

* Studio: bind a reference transcript to the clip it was made from

* Studio audio: keep Hub music models tagged text-to-speech off Speak

MiniMax Music 3 reports text-to-speech on the Hub, so the row filter now
asks the music catalog before the pipeline tag.

* Studio audio: list trained music checkpoints on Music, not Speak

* Studio: release a superseded mic request, accept MP4 in the chooser, keep emotion-clip 404s

* Studio Edit: hold Generate when every word is deleted

* Studio: keep the Audio rail scroller's classes level with Images

The single-child wrapper that keeps the scroll fades in sync stays; the
scroller itself keeps the gap and bottom padding the Images rail uses.

* Studio: a new reference pick clears an earlier upload error

* Studio audio: apply a transcript only to the clip it came from

* Studio Edit: keep an edit's Original, steady the compare, and trust only spoken history text

- Gallery prune and Clear keep a source clip while a remaining edit still plays it as its Original.
- The Original/Edited player resets for a new pair, not when the Original's file finishes loading.
- A history pick fills ① only with speech: not a Music description or the file name an untranscribed edit is titled by.
- Edit's recording card no longer promises to use the first 30 s of a take it refuses.
- A new recording cancels the previous one's transcription and clears its error.

* Studio Edit: keep only hidden Edit originals from prune and Clear, and show a loading side as stopped

* Studio: tag the clone fallback clip with its workflow

* Studio: cap the stored rate of an audio upload at 48 kHz

* Studio: open clone-only picks on Clone; keep a fallback clip on its own page

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Studio: keep audio settings and Speak runs from failing on clone checks

/audio/run rejected any option whose name had "audio" or "ref" in it, so
FireRedAudio's min_new_audio_steps, Irodori's no_ref and DramaBox's
audio_chunk_* settings got a 422. Only names that carry a location, or a
text value under a name ending in audio, wav or ref, are refused now.

The worker passed the run fields to every backend, so a Speak run on a
native TTS model failed with an unexpected keyword. They now reach only a
backend that takes them, and reference audio sent to one that cannot clone
gets a 400 that says so.

* Studio: release the mic when Audio is hidden and let pages set the source card's copy

The Audio page stays mounted when hidden, so leaving it mid-recording kept
the microphone live. The Clone rail now tells its cards when the page is
hidden and the card ends the recording.

The source card spoke about a clone reference on every page. Its expired
message, "Uses the first N s" note, record hint and recording cap are
props now, defaulting to Clone's.

Every pick drew under the one "local" key, so a slow decode of an earlier
file could draw over the next one. Each pick gets its own key.

* Studio: truncate long history prompts and voice names in the source card

Both lists are grids, whose rows default to min-width: auto, so one long prompt made its row thousands of pixels wide and pushed the duration off the card. The lists now use a minmax(0, 1fr) column and min-w-0 rows, so the text truncates and the duration stays visible.

* Studio: open Clone for a clone-only model already loaded on mount

* Studio Edit: stop recording at the 30 s Edit accepts

* Studio Edit: build again after the unslothai#12602 merge

Drop the duplicated TTS_MAX_TOKENS import and tag an unsaved edit's fallback clip with the Edit workflow, as the parent now does for Speak and Clone.

* Studio: drop a removed clip's transcript with it

* Studio: keep Audio clips across page switches and fit the header at large UI sizes

Picking a History clip on the other page cleared this page's unsaved clip,
which can be the only copy, so it is kept now. Send to checks again after the
clip downloads, since a run started meanwhile was stopped by the switch and
the clip dropped. The header's Library link drops its label before it would
truncate at large UI sizes.

* Studio: hold Generate while a reference or emotion clip upload fails, runs or expires

* Studio: fence reference uploads during an account switch and hold Speak on a deleted voice

The progress upload uses its own XHR request and skipped the check that
authFetch makes while another tab switches accounts, so a reference
picked in that window was stored under the next account. It refuses the
same way now.

Deleting a saved voice on Clone left Speak's choice pointing at it, so
Generate stayed enabled and the run failed with "voice not found". Speak
now checks its saved voice against the loaded list and says it was
deleted.

* Studio: tidy Clone reference copy and keep saved voice names distinct

The expired-reference blocker said "Add it again" twice, once in its
reason and once as its action. The From history empty text no longer
names pages, since other pages list their clips too. A saved voice can
no longer take the name of another one.

* Studio: offer Speak's saved voice only where no transcript is required

* Studio: let the dedupe test allow a refreshed expiry

* Studio: drop an expired reference's transcript and load voices before naming one

"Add it again" under Generate cleared the expired clip with setReference,
which left its transcript behind; the next clip then went out with the old
words. It now drops the clip the same way Remove does.

The save dialog's duplicate-name check read the saved voices list, which
only loads with the voice picker, so on a fresh Clone page it saw no
voices. The dialog loads the list when it opens.

* Studio: hold the Audio page busy while a reference transcribes

* Studio: a failed voice deletion restores only that voice

* Studio: bound voice previews, drop stale ones, and lock the voice menu while busy

* Studio: refetch saved voices when a save lands during a list fetch

* Studio: sweep expired reference copies when a clip or voice is prepared

* Studio: sweep expired audio inputs at startup and hourly

Expired reference uploads were removed only when the same account
uploaded or prepared another reference, so an idle account kept them on
disk past their day. Every account's inputs are now swept at startup and
then hourly, and an account with no inputs folder is left untouched.

A test also pins that a deleted history clip or saved voice keeps the
reference card in error, which holds Clone's Generate.

* Slim Studio audio edit backend tests

Table-drive the refusal, markup and instruction checks, share the run_route helpers, and merge tests that drove the same flow (chain + cancel, Vevo2/FireRed sessions, source reuse + cap + scoped clear, saved voice + cannot-edit, clear route + scoped clear).

* Studio Edit: table-drive and consolidate the frontend tests

Merge the diff tests into the adapter tests, the panel tests into the
policy tests and the A/B state tests into the host tests. Same behaviours
covered with fewer, table-driven asserts; drop source regexes that only
restated editor class names.

* Redact the runtime log before cutting its tail, and open the task's page for model deep links

* Keep a cleared Clone transcript cleared instead of refilling it from the saved voice

* Keep a refused Audio page request until it can switch, and gate task-only links like workflow links

* Clear an expired reference when a new one is picked, and roll back only the voice whose rename failed

* Hand a Library clip's page over through ?workflow= so a busy Audio page opens it later

* Edit: page past hidden originals and accept the 30 s timer's frame of slack like the server

* Edit: keep trained speech checkpoints off the Edit model picker

* Infer Music from the audio type when a model link carries no task

* Refuse video, image and MIDI file options in audio runs like audio ones

* Redact file:// and colon-prefixed runtime paths, and drop a partial first word from a newline-free log tail

* Clone: list clone-only families from Hub search on Clone, and drop a long clip's text past the 30 s cut

* Clone: take a reference's transcript only when it fits the 30 s the runtime gets

* Clone: share the clone-only family hint with chat routing, cover every speaks=False family, and count only kept inputs toward the byte cap

* Drop a log tail that has no delimiter to cut at

* Clone: list Fish Audio Hub rows on both Speak and Clone before download

* Pin the Read aloud handoff test to the workflow gate task links now use

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Han <[email protected]>
@unslothai unslothai deleted a comment from shimmyshimmer Oct 4, 2026
@unslothai unslothai deleted a comment from shimmyshimmer Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants