Tooluck logoTooluck
SKILL.md

Multimodal Fusion for Speaker Diarization

Agent skill frombenchflow-ai/skillsbench

Combine visual features (face detection, lip movement analysis) with audio features to improve speaker diarization accuracy in video files. Use OpenCV for face detection and lip movement tracking, then fuse visual cues with audio-based speaker embeddings. Essential when processing video files with multiple visible speakers or when audio-only diarization needs visual validation.

How to install Multimodal Fusion for Speaker Diarization

install Multimodal Fusion for Speaker Diarization
# install the skillsbench pack with the skills CLI
npx skills add benchflow-ai/skillsbench

# or add only this skill to Claude Code: copy the folder

tasks-extra/speaker-diarization-subtitles/environment/skills/multimodal-fusion/

# into

~/.claude/skills/multimodal-fusion/ (all projects)

.claude/skills/multimodal-fusion/ (one project)

tasks-extra/speaker-diarization-subtitles/environment/skills/multimodal-fusion/SKILL.md

Apache-2.0Full file
1# Multimodal Fusion for Speaker Diarization
2
3## Overview
4
5When working with video files, you can significantly improve speaker diarization by combining audio features with visual features like face detection and lip movement analysis.
6
7## When to Use
8
9- Processing video files (not just audio)
10- Multiple speakers visible on screen
11- Need to disambiguate speakers with similar voices
12- Improve accuracy by leveraging visual cues
13
14## Visual Feature Extraction
15
16### Face Detection
17
18```python
19import cv2
20import numpy as np
21
22# Initialize face detector
23face_cascade = cv2.CascadeClassifier(
24 cv2.data.haarcascades + 'haarcascade_frontalface_default.xml'
25)
26
27# Process video frames
28cap = cv2.VideoCapture(video_path)
29fps = cap.get(cv2.CAP_PROP_FPS)
30faces_by_time = {}
31
32frame_count = 0
33frame_skip = max(1, int(fps / 2)) # Process every other frame
34
35while cap.isOpened():
36 ret, frame = cap.read()
37 if not ret:
38 break
39
40 if frame_count % frame_skip == 0:
41 timestamp = frame_count / fps
42 gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
43 faces = face_cascade.detectMultiScale(gray, 1.1, 4)
44 faces_by_time[timestamp] = len(faces)
45
46 frame_count += 1
47
48cap.release()
49```
50
51### Lip Movement Detection
52
53```python
54lip_movement_by_time = {}
55prev_mouth_roi = None
56
57while cap.isOpened():
58 ret, frame = cap.read()
59 if not ret:
60 break
61
62 if frame_count % frame_skip == 0:
63 timestamp = frame_count / fps
64…

Excerpt shown under the repository's Apache-2.0 license.

More skills in skillsbench

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates