Skip to content

Save the transcript of a recording without speech too, so the file that the log reports and the editor opens exists - #356

Open
happyarts wants to merge 1 commit into
kaixxx:mainfrom
happyarts:fix/save-empty-transcript
Open

happyarts wants to merge 1 commit into
kaixxx:mainfrom
happyarts:fix/save-empty-transcript

Conversation

@happyarts

Copy link
Copy Markdown
Contributor

The transcript file is written once the first segment arrives. When Whisper returns none (silence, music, a recording that is too quiet), nothing is written. The log still says "Saved to: …" with a link, the CLI prints "Output saved to …" and exits 0, and for a single html job the editor is opened on a file that does not exist.

A transcription that succeeded now saves the document even without segments: the title and header with the options, like any other transcript. A transcription that failed still writes nothing.

tests/test_empty_transcript.py runs HeadlessApp._process_single_job on a silent WAV with the Whisper worker stubbed: once returning no segments (the transcript must exist and hold the header), once raising (no file). Also checked end to end with the real Whisper worker on 10 s of silence: before, "Output saved to" and no file; now a 1.3 KB transcript.

🤖 Generated with Claude Code

…at the log reports and the editor opens exists

The transcript was written only once the first segment arrived. When
Whisper returned none -- silence, music, a recording that is too
quiet -- the log still said the transcript was saved and linked it, and
for a single html job the editor was opened on a file that did not
exist. A transcription that succeeded now saves the header all the
same; one that failed still writes nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant