Evo speaker diarization subtitles

From OpenLAIR/OpenSkill · View interactive version

Evo speaker diarization subtitles is an AI agent skill from the GitHub repository OpenLAIR/OpenSkill. End-to-end speaker diarization and subtitle generation pipeline for video/audio files. Extracts audio via ffmpeg, performs VAD (silero-vad), extracts ECAPA-TDNN speaker embeddings (speechbrain), clusters speakers (agglomerative clustering with cosine distance), transcribes with OpenAI Whisper, align

How to use this skill

Skill file

evo-speaker-diarization-subtitles

End-to-end speaker diarization and subtitle generation pipeline for video/audio files.

Pipeline

  1. Audio extraction: ffmpeg → 16kHz mono 16-bit PCM WAV
  2. Voice Activity Detection: silero-vad (with fallback to torch.hub if direct import unavailable)
  3. Speaker embedding extraction: SpeechBrain ECAPA-TDNN (spkrec-ecapa-voxceleb)
  4. Speaker clustering: Agglomerative clustering with cosine distance + silhouette-based speaker count selection
  5. Transcription: OpenAI Whisper with word-level timestamps
  6. Alignment: Word-level IoU overlap mapping from Whisper words to diarized speaker segments
  7. Output generation: RTTM (pyannote.core or manual), ASS subtitles, JSON report

Usage

import sys
sys.path.insert(0, '/app/environment/skills/evo-speaker-diarization-subtitles/scripts')
from utils import (
    extract_audio, get_audio_duration, run_vad,
    merge_close_segments, extract_speaker_embeddings,
    cluster_speakers, run_whisper_transcription,
    align_transcription_with_speakers,
    write_rttm, write_ass, write_report,
    format_time_ass
)

Dependencies

ffmpeg, torch, torchaudio, speechbrain, openai-whisper, silero-vad,

scikit-learn, numpy, soundfile, scipy, pyannote.core

Key Domain Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.