Spaces:
Sleeping
Sleeping
Commit History
-
Whisper jobs read pause-cut pieces in GPU batches; no stitched 30 s windows
The HF pipeline's 30 s windows (5 s stride) and the 5 min block merge dropped whole sentences and repeated others. On a real 3 min call large-v3 lost the 'within five to ten days...' and 1:53-2:11 passages; on a 24 min file the old path kept 2166 words with one 3 min stretch down to 130, the new one 3021, even across the file, at about the same speed (T4: 179 s processing). - whisper_pieces: speech found from the recording's noise floor, long silences left out, cut at the quietest 0.3 s before 28 s. - ASRPipeline.transcribe_pieces: batched, no silence skip on known speech. - Strip invented all-caps caption names ('BORIS HABIB KOMOKOIKEA- '). - Claude clean-up: never move words between lines; reject corrections that add words (they duplicated the next line). - Speaker alignment: lines with no overlapping turn take the nearest turn. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>f6a9200
-
Auto-detect probe for Yoruba/Hausa; one-speaker recordings stay one speaker
Auto-detect (the app default) still used Whisper's language guess, which calls Yoruba names English: "1 02 Male Names" came out as 16 English words for 86 s. A sample of pieces is now read by the dedicated model and Whisper; when the dedicated model is surer on half, the recording takes the Yoruba path (English parts still kept). AMI English meeting: 1/8 -> stays English. A Nigerian language plus English also takes that path. Speakers: pyannote was forced to find at least 2, and the voice check only ever added speakers, so one-person lessons showed 2-3 speakers. No minimum now; one speaker when neither pyannote's split nor the voices show distinct people; voice groups must be clearly distinct (silhouette 0.30) to add speakers. 1-02/1-06: 1 speaker; dialogues 3; AMI 4. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>e98e60e -
Separate similar voices by sentence; keep short English phrases in English
Speakers: pyannote decides in 10 s windows and merged two similar voices taking short turns (Beginner's Yoruba dialogues: narrator + whole dialogue as "2 speakers"). Each sentence now gets a voice fingerprint (pyannote's own embedding model), sentences are grouped by voice (average linkage, cosine 0.45), and that grouping replaces pyannote's when it separates voices clearly better (silhouette +0.10) and does not reduce the speaker count. Dialogues: 2 -> 3 speakers alternating correctly. AMI IS1009a 94.8% -> 95.9% of speech attributed correctly; ES2004a 98.5% (no regression). Language: English phrases of 1.2 s+ that Whisper scores 6+ nats above the main language are pinned to English even below the 5 s run minimum (measured: English titles +6.4..+8.8, Yoruba windows never above +4.0). "lẹncerin forward in dialogue" -> "Lesson 4-1. Dialogue." Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>a8bd243
-
Port long-audio reliability fixes from the HF Space (see Space commit eb4ae44)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>32c229b
-
Fix pyannote import on Modal: upgrade torch to 2.5.1, expose real import error in diarization-status
- Bump modal_app.py torch from 2.1.0 to 2.5.1 — old version caused pyannote.audio import failure due to speechbrain/torch incompatibility on A10G GPU - diarization-status endpoint now runs pyannote import directly to capture the real exception instead of relying on cached module flags - engine.py stores _PYANNOTE_IMPORT_ERROR for future diagnostics Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>ff7b4ba
-
Fix diarization diagnostics, upgrade torch/Dockerfile, add min_speakers hint
- Add startup log + GET /diarization-status endpoint to expose why diarization is available or not (pyannote importable, HF_TOKEN set) - Dockerfile: upgrade base to python:3.11-slim, install CUDA torch wheel before requirements.txt, run as UID 1000 (HF Spaces requirement) - requirements.txt: upgrade torch/transformers/accelerate for torch 2.5+ compatibility, remove gradio/spaces deps (API-only mode) - diarization/engine.py: pass min_speakers=2 when num_speakers not given to prevent pyannote collapsing all speech to a single speaker Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>8280496
-
fix: persistent job storage, Yoruba diacritics, diarization alignment, multi-language support
- Add Supabase-backed persistent job storage (fixes lost results on container restart) - Add Yoruba knowledge base with 100+ names/vocabulary and tone rules - Integrate Yoruba knowledge into Claude diacritics post-processing - Fix diarization alignment for chunked audio (accumulate overlap per speaker) - Remove hallucination-causing stock-sentence initial_prompts - Pass language code explicitly to Whisper for Nigerian languages - Support comma-separated multi-language hints (yo,en / ig,en / ha,en) - Fix invalid segment timestamps (end < start) from Whisper - Improve repetition loop detection (sentence-level, char-dominance) - Update Claude model to claude-haiku-4-5-202510013dcdf79
-
fix: VBR MP3 chunking, beam search, spanning segments, diarization threshold
- engine.py: use len(audio)/sr as actual duration so VBR MP3s (where sf.info() silently returns wrong duration) correctly trigger chunking; pass last 200 chars of each chunk as initial_prompt for cross-chunk context - validator.py: route MP3/M4A/AAC/WMA directly to pydub (skip soundfile which misreports VBR container durations without raising an exception) - chunker.py: keep segments that straddle the overlap cutoff (seg_end > cutoff) instead of dropping them entirely, preventing silent content loss at boundaries - asr_pipeline.py: forward beam_size from config to generate_kwargs so settings.yaml beam_size: 5 actually runs beam search instead of greedy - diarization/engine.py: lower speaker assignment threshold 30% -> 20% to handle fast turn-taking where short segments span two speakers Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6ad496b
-
Switch to async FastAPI REST API; fix chunker dedup, GPU diarization, torch dtypes, pydub duration
- Dockerfile: serve app.py via uvicorn (FastAPI REST) instead of Gradio UI - app.py: /transcribe returns 202 immediately, background task runs pipeline, /result/{job_id} for polling - chunker.py: fix merge dedup (>= last_end_time), monotonic segment IDs - diarization/engine.py: explicitly move pyannote pipeline to cuda:0 - registry.py: torch_dtype=float16 on CUDA, chunk_length_s/stride_length_s - asr_pipeline.py: strip unsupported generate_kwargs - validator.py: use pydub for full-duration extraction (not librosa truncated) - requirements.txt: add torchaudio==2.1.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1deeec7
-
fix: catch OSError during pyannote import on CPU-only containers
4ef007b -
feat: speaker diarization, CSV export, translation, Nigerian languages, video support
- Add pyannote.audio-based speaker diarization engine (src/diarization/) - Add Meeting Mode to Gradio UI with expected speaker count hint - Add CSV export format for spreadsheet-friendly meeting minutes - Update /transcribe API to accept diarization, num_speakers params - Include segment IDs in ASR pipeline for frontend compatibility - Add video file support via existing MP4 handling - Promote Hausa, Yoruba, Igbo in language lists - Update README with new API docs and HF_TOKEN setup instructions305b729