Skip to content

feat(transcribe): speaker-grouped output format + CLI hint for diarization#14

Merged
master5d merged 1 commit into
mainfrom
feat/speaker-format
Jun 3, 2026
Merged

feat(transcribe): speaker-grouped output format + CLI hint for diarization#14
master5d merged 1 commit into
mainfrom
feat/speaker-format

Conversation

@master5d
Copy link
Copy Markdown
Owner

@master5d master5d commented Jun 3, 2026

Why

Requested speaker markup for diarized transcripts:

[Speaker 2] (0:01 - 0:16)
Hi, my name is Dan Shaw and I'm here with Ron Quinn...

[Speaker 1] (0:17 - 0:56)
Vastu is actually the science of manifestation...

What

  • OutputFormat::Speaker (transcript_format.rs): consecutive same-speaker sub-segments collapse into one block [Speaker N] (M:SS - M:SS) + the turn text, blank line between turns. New fmt_clock (M:SS, no leading-zero minute) matches the (0:01 - 0:16) style. Tests included.
  • CLI: --format speaker (aliases speakers/diarized); updated --format doc + the "Unknown format" error.
  • GUI: a note under the Speaker diarization toggle steering reliable / long-file diarization to the CLI, since in-app diarization is CPU-only and slow (and a GUI run can be interrupted by navigating away). New i18n key diarizeCliNote added to all 20 locales (en/ru translated, en fallback elsewhere).

No bindings.ts change — transcribe_file_to_string already takes format: String.

Usage

echo --transcribe-file "talk.mp3" -o "talk.txt" --diarize --format speaker

Verification

tsc, eslint, prettier@3.8.3 --check, cargo fmt, and check:translations (20/20) all clean locally.

🤖 Generated with Claude Code

…ation

Adds an OutputFormat::Speaker that renders diarized turns as the requested
markup — consecutive same-speaker segments collapse into one block:

    [Speaker 2] (0:01 - 0:16)
    Hi, my name is Dan Shaw...

    [Speaker 1] (0:17 - 0:56)
    Vastu is actually...

- transcript_format.rs: `Speaker` variant, `fmt_clock` (M:SS, no leading-zero
  minute), render arm grouping consecutive same-speaker sub-segments; tests.
- CLI: `--format speaker` (also `speakers`/`diarized`); doc + error text.
- GUI: a note under the diarization toggle steering long-file/​reliable
  diarization to the CLI (`echo --transcribe-file … --diarize --format speaker`),
  since in-app diarization is CPU-only and slow. New i18n key `diarizeCliNote`
  across all 20 locales (en/ru translated, en fallback elsewhere).

No bindings change (the command already takes `format: String`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@master5d master5d merged commit 296c469 into main Jun 3, 2026
4 checks passed
@master5d master5d deleted the feat/speaker-format branch June 3, 2026 06:18
master5d added a commit that referenced this pull request Jun 3, 2026
Bundles the Transcribe File UX fixes (#13: no ffmpeg console flash, run state
persisted across tab switches) and the speaker-grouped output format (#14:
`[Speaker N] (M:SS - M:SS)` blocks, CLI `--format speaker`, diarization-CLI
hint) into one release. (Supersedes the unpublished v1.1.3 draft.)

Co-Authored-By: Claude Opus 4.8 <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