* fix(batch): check the speech model when restoring, not in every pipeline run
#4623 added the missing-model check to the batch transcribe stage. Every
batch pipeline test that does not stub it then failed in CI's model-free
environment, leaving main red. Restored jobs are the only ones that skip
enqueue's check, so restore now checks once and shows such a job as failed
with Retry, leaving the pipeline as it was.
Also confines queue record paths to the batch folder after resolving them
(the CodeQL path alerts on the record writer) and reads test files as UTF-8.
* fix(batch): check the speech model inside the transcribe step itself
Review found that a job queued before its speech model was removed could
still download it, and that checking at restore can run before startup
swaps a missing saved model for an installed one. The check now runs in the
transcribe function, right before the backend loads, for every job: queued,
retried or restored. Pipeline tests that stub the guarded transcribe call
never reach it; the one test that runs it with a stubbed model opts out.
Queue record paths are checked after resolving but replaced and removed by
their own directory entry, so a link can't make a cleanup delete another
job's record.
A subtitle-only job (/dub/from-srt) has no vocals or audio file. The SSE
route already refused it with "No audio available for transcription."; the
legacy blocking route handed None to the ASR backend and returned 500. It
now answers 409 before any ASR preflight or model load.
The subtitle-only transcribe test uses the asr_model_installed fixture, so
it asserts the job-level refusal on CI (no ASR weights) as on a dev
machine. A whisper.cpp language test now creates the audio file it names.
An unknown caption tag now resolves to no language, but importing the
captions cleared the missing-language marker, so translation fell back
to English. Keep the marker when the tag is unknown, and match language
names whole so "myanmar-english" is not read as Burmese.
Trimming a segment's end to its last voiced speech before diarization
could cut a whispered reply sharing that segment, which the re-split
then dropped. Both transcription paths now keep the original bounds
through diarization and trim each speaker's line afterwards.
Convert gets a Keep my delivery switch that converts the recording itself
through CosyVoice 3's upstream inference_vc, so only the voice changes and
the source timing, pauses and intonation stay (#3421). Engines declare
supports_voice_conversion; the active engine is used when it converts,
otherwise any installed one; a typed 409 names what to install.
Dub onset snapping now requires voiced speech, so a sigh, breath or rustle
no longer sets a line's start, long snaps may cross audible non-speech, and
line ends are trimmed back to the last voiced speech (#3419 item 3).
Batch dubbing stopped with a generic RuntimeError whose text was hidden
behind More info. It now raises SourceLanguageRequiredError, a terminal
SOURCE_LANGUAGE_REQUIRED failure class with a hint, and the batch card
shows a localized message that says to choose the source language in
Dubbing or use an ASR model that detects it.
Run local transcription and translation while preserving CPU choices, cached checkpoint names, actual model provenance and consistent source-language choices for translation, pack setup and glossary extraction.