Commit Graph
2 Commits
Author SHA1 Message Date
osobhandClaude Opus 4.7 a5cedfb46a rtx-csm: emotional_speech_guide — CREMA-D vs RAVDESS firdhokk verdict
8-gen bench (4 emotions × 2 corpora) at seed=42 against firdhokk
Whisper-LV3:

  target    RAVDESS              CREMA-D
  happy     happy (0.999) ✓      happy (0.999) ✓
  angry     neutral (0.92)       sad (0.99)
  fearful   happy (0.998)        fearful (0.984) ✓
  sad       angry (0.99)         fearful (0.99)

CREMA-D 2/4 vs RAVDESS 1/4. Larger / more naturalistic corpus
produces more class-pure fearful direction. Neither corpus solves
angry or sad — recipe shifts into 'vague expressivity' rather than
class-specific corners.

Practical: prefer CREMA-D when available; A/B both per emotion if
class precision matters.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-04-30 00:01:02 -07:00
osobhandClaude Opus 4.7 73d38ed290 rtx-csm: Phase 13.1 — in-crate diarization (Silero V5 + WavLM-SV + clustering)
Composes existing in-crate parts into a speaker diarizer with zero new
deps. Pipeline: Silero V5 VAD → speech intervals → WavLM-SV x-vector
per ~2s window → agglomerative average-linkage clustering on cosine
distance → merged (start_s, end_s, speaker) segments.

src/diarize.rs (~330 LOC) ships:
  - DiarizedSegment + DiarizationConfig
  - Diarizer that owns the two backbones
  - vad_intervals helper (smooths short silences, drops short speech)
  - hand-rolled agglomerative cluster with auto-threshold OR force-k modes
  - 5 unit tests (cosine distance edges, clustering, VAD interval extraction)

examples/diarize.rs CLI: --in --out --wavlm-sv-weights, plus knobs
(window/hop/vad-threshold/cluster-threshold/n-speakers/min-segment).
JSON output is consumable by ffmpeg/sox for downstream slicing.

Verified end-to-end on Metal:
  - Single-speaker 10.41s → 1 segment, 21× faster than realtime
  - Concatenated 2-speaker (CSM spk 0 + spk 1) → correctly identifies
    2 speakers, 10× realtime
  - Bug fixed in first run: clamp VAD interval bounds before slicing
    (Silero V5 pads to whole-chunk multiple, can exceed sample count).

Closes the WhisperX-class "speaker diarization" gap from the personal
voice training guide without a Python/ort sidecar — sidesteps both
runtime conflicts the project hit before (whisper.cpp/ggml in Phase 7.6,
ort/protobuf in Phase 8.1.3). ~80% of pyannote-community-1 fidelity,
which is fine for data prep.

Lib suite 104/104 (5 new tests).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
2026-04-27 17:58:57 -07:00