Repository navigation
fix(jobs): skip transcribe and diarize for imported transcripts - #345
Merged
Merged
Conversation
A pasted or imported transcript (no audio) queued the standard pipeline from transcribe, so a fresh install fetched PyTorch and SenseVoice (about 1 GB) before analysing it, only for transcribe to skip. for_source now leaves both steps out for a transcript source, as it does for documents and images. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKh8zrmfKCvPJhRiv6u9mY
18 of 22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: on a fresh install, importing a pasted transcript (or a transcript file without its audio) queued the standard pipeline from
transcribe. The worker saw a queued job waiting fortranscribe, fetched PyTorch and SenseVoice (about 1 GB) on first use, and held the job until the fetch finished, only fortranscribeto skip with "an imported transcript has nothing to transcribe".After: the job for an imported transcript starts at the steps that have work to do (analysis, embedding, summary, report). No speech or voice model is fetched for it, and analysis starts straight away.
How:
jobs.for_source()already rewrote steps for documents and images. It now also dropstranscribeanddiarizefor atranscriptsource. If those two are the only steps asked for (an explicit run, or a batch over mixed resources), they're kept, so the request still queues a job that says why it skips instead of failing with a 400.Motivation and Context
Found by the clicks survey. It broke "light by default", since a Raspberry Pi install with cloud models should never download a local speech model to import text.
Steps to reproduce (if appropriate):
POST /api/v1/import {"namespace": "pods", "text": "[00:00] Ann: Hi."}on a fresh install. Before this change the job'snext_stepwastranscribe, and Settings › Components showed PyTorch and SenseVoice being fetched.Types of changes
!in the title)Checklist:
make hookschecks it on commit). Ruff check, ruff format and mypy are clean.test_a_pasted_transcript_never_waits_for_a_speech_modelfails on main (the steps start['transcribe', 'diarize', 'shots', …]) and passes here.test_choosing_the_pipeline_that_runs_afternow expects the standard pipeline without those two steps. The full backend suite passed locally: 920 passed, 18 skipped.docs/accordingly (docs/api.mdimports,docs/components.md).mkdocs build --strictis clean.## UnreleasedinCHANGELOG.md. n/a: the title says it.Done questions (AGENTS.md)
POST /import, the MCP and assistant import tools, and the CLI.DEVLOG.md:🤖 Generated with Claude Code
https://claude.ai/code/session_01TKh8zrmfKCvPJhRiv6u9mY
Generated by Claude Code