一键导入
self-learning-calibration
Profile-based threshold adjustment using correction feedback from manual reviews
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Profile-based threshold adjustment using correction feedback from manual reviews
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | self-learning-calibration |
| description | Profile-based threshold adjustment using correction feedback from manual reviews |
Use when improving VAD accuracy across different content genres. Applies to tasks involving threshold tuning, correction analysis, and profile management.
Profiles encode genre-specific threshold adjustments:
| Profile | Threshold Delta | Use Case |
|---|---|---|
| action | +0.010 | Explosions, gunfire, music drowning speech |
| documentary | -0.003 | Clean narration, controlled studio |
| animation | +0.000 | Mixed: clean dialogue + sound effects |
| drama | -0.001 | Intimate scenes, whispered dialogue |
Manual correction → CorrectionRecord → corrections/*.json
↓
run_calibration() analyzes
↓
analysis/learnings/latest-calibration.json
struct CorrectionRecord {
original_kind: String, // "speech" or "non_voice"
corrected_kind: String,
segment_start_ms: u64,
segment_end_ms: u64,
media_path: String,
// ... metadata
}
Correction types:
speech → non_voice: False positive (threshold too low)non_voice → speech: False negative (threshold too high)// Net drift based on correction imbalance
let drift = (non_voice_to_speech as f32 - speech_to_non_voice as f32) * 0.0005;
let recommended_delta = base.energy_threshold_delta + drift;
Interpretation:
speech → non_voice: Threshold too low → increase deltanon_voice → speech: Threshold too high → decrease delta| Genre | Priority | Strategy |
|---|---|---|
| action | Recall | Lower threshold to catch speech in noise |
| documentary | Precision | Higher threshold for clean narration |
| animation | Balanced | Medium threshold |
| drama | Precision | Lower threshold for whispers |
// Compare two thresholds on same media
let baseline = pipeline::run(&config, threshold: 0.015);
let candidate = pipeline::run(&config, threshold: 0.017);
let delta = compare_segments(&baseline.segments, &candidate.segments);
// If delta < 5% change, thresholds are functionally equivalent
# 1) verify and persist to DB
timeline verify-timeline testdata/raw/elephants_dream_2006.mp4 \
--timeline analysis/validation/elephants_dream_2006_spectral.json \
--output analysis/validation/elephants_dream_2006_verified.json \
--save-learning \
--learning-db analysis/thresholds/learning.db
# 2) inspect DB health
timeline learning-stats --learning-db analysis/thresholds/learning.db
# 3) generate recommendations from DB
timeline update-thresholds \
--learning-db analysis/thresholds/learning.db \
--output analysis/thresholds/recommendations-db.json
Use DB mode for multi-movie accumulation; use JSON learning-state for compatibility.
# 4) rank candidates with coverage guard
python3 scripts/optimize_fp_sweep.py \
--output analysis/optimization/fp-sweep-ranked.json \
--min-coverage-ratio 0.7
# 5) generate modern/legacy profiles from recommended policy
python3 scripts/generate_optimized_profiles.py \
--sweep-report analysis/optimization/fp-sweep-ranked.json
Generated profiles:
config/profiles/modern-optimized.jsonconfig/profiles/legacy-optimized.jsoncargo run --bin calibrate -- corrections/ documentary
Output: analysis/learnings/latest-calibration.json
{
"version": 1,
"profile": "documentary",
"records_seen": 47,
"speech_to_non_voice": 12,
"non_voice_to_speech": 3,
"recommended_energy_threshold_delta": -0.005
}
| Correction Pattern | Diagnosis | Adjustment |
|---|---|---|
Mostly speech → non_voice | Threshold too low | +0.002 to +0.005 |
Mostly non_voice → speech | Threshold too high | -0.002 to -0.005 |
| Mixed, balanced | Good threshold | Minor tweak ±0.001 |
| <10 corrections | Insufficient data | Gather more corrections |
cargo run -- analyze media.mp4 --threshold 0.017
# Overrides profile delta for single run
non_voice: breathing, mic noise, ambient sound, musicspeech: any audible human voice, including whisperscorrections/
movie1_action_scene1.json
documentary_episode2.json
drama_s01e03_interview.json
records_seen >= 30: Sufficient sample sizeCoordinate 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.