بنقرة واحدة
nonvoice-segmentation
Converting frame-level VAD output to non-voice segments with duration constraints
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Converting frame-level VAD output to non-voice segments with duration constraints
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Coordinate multiple agents for software development across any language. Use for parallel execution of independent tasks, sequential chains with dependencies, swarm analysis from multiple perspectives, or iterative refinement loops. Handles Python, JavaScript, Java, Go, Rust, C#, and other languages.
Multi-step GOAP planning for complex audio pipeline development. Orchestrates analysis, decomposition, strategy selection, and execution with state persistence in plans/.
Generates DORA metrics and agent delivery reports from structured events.
Records agent execution events for lead time, success rate, and human intervention tracking.
Generic TRIZ analysis for identifying technical and physical contradictions in software architecture and pipelines.
Generic TRIZ solver for resolving architectural and technical contradictions using inventive principles.
| name | nonvoice-segmentation |
| description | Converting frame-level VAD output to non-voice segments with duration constraints |
Use when implementing or debugging the segmentation stage after VAD classification. Applies to tasks involving segment smoothing, merging, inversion, and duration enforcement.
[Frame] → [bool] (RMS threshold)[bool] → [bool] (hangover + flicker removal)[bool] → [Segment] (duration filtering)[Segment] → [Segment] (gap closing)[Segment] × total_ms → [Segment] (complement)Segment {
start_ms: u64,
end_ms: u64,
kind: SegmentKind, // Speech | NonVoice
confidence: f32,
tags: Vec<String>,
prompt: Option<String>,
}
Purpose: Prevent clipping of speech endings (stop consonants, breath bursts)
// Apply N-frame hangover after detected speech
pub fn smooth_speech(raw: &[bool], frame_ms: u32, hangover_ms: u32) -> Vec<bool> {
let hang = (hangover_ms / frame_ms) as usize;
// ... appends true to frames within hangover window
}
hangover_ms / frame_ms (e.g., 200ms / 20ms = 10 frames)Purpose: Eliminate single-frame false positives/negatives
// Remove isolated speech frames surrounded by non-voice
for i in 1..out.len()-1 {
if out[i] && !out[i-1] && !out[i+1] {
out[i] = false; // Isolated frame → non-voice
}
}
Purpose: Filter out brief noise bursts that aren't actual speech
// Only emit segments >= min_speech_ms
pub fn speech_segments(smoothed: &[bool], frame_ms: u32, min_speech_ms: u32) -> Vec<Segment> {
let min_frames = (min_speech_ms / frame_ms) as usize;
// ... only include runs longer than min_frames
}
| Parameter | Default | Purpose |
|---|---|---|
min_speech_ms | 120ms | Minimum speech segment duration |
min_non_voice_ms | profile-driven (default 10000ms, radio-play 500ms) | Minimum non-voice segment duration |
Purpose: Reconnect speech separated by brief pauses (pauses, breaths)
// Merge segments within merge_gap_ms of each other
pub fn merge_close_segments(segments: &[Segment], merge_gap_ms: u32) -> Vec<Segment> {
// Combines overlapping or adjacent segments
}
min(confidence_a, confidence_b)Purpose: Generate non-voice segments as complement of speech
pub fn invert_to_non_voice(speech: &[Segment], total_ms: u64, min_non_voice_ms: u32) -> Vec<Segment> {
// cursor walks through timeline, emits NonVoice gaps
// Skips gaps < min_non_voice_ms (treats as silence, not a segment)
}
Key behavior:
min_non_voice_ms are discarded (value is profile/config driven)| Failure | Symptom | Fix |
|---|---|---|
| Short breath sounds split | Multiple 50ms segments instead of one | Decrease min_speech_ms, increase hangover_ms |
| Long pauses included | 3s gaps included as non-voice | Increase min_non_voice_ms |
| Music/ambient bleeding | Non-speech audio detected as speech | Increase threshold in VAD stage |
| Clipped word endings | Speech segment ends 100ms early | Increase hangover_ms |
| Over-merged segments | Two separate scenes merged | Decrease merge_gap_ms |
duration >= min_non_voice_msduration >= min_non_voice_ms// From end of speech_segments():
if let Some(s) = start {
let end = smoothed.len() as u64 * frame_ms as u64;
if end - s >= min_speech_ms as u64 {
segs.push(speech_seg(s, end));
}
}
min_non_voice_ms for selected profilestart_mstotal_ms (no gaps)// Merge test: 200ms + 300ms speech with 120ms gap should merge at 120ms threshold
let speech = vec![speech_seg(0, 200), speech_seg(300, 500)];
let merged = merge_close_segments(&speech, 120);
assert_eq!(merged.len(), 1); // Merged into single segment
min_non_voice_ms