- Add transcript break phrase detection (going_to_break/coming_back cues) - Create segments from transcript breaks with silence boundary snapping - Fix segment dedup in merge_adjacent (handle overlapping segments) - Add CUDA 12 library path fix (gpu.py + venv activate hook) - Auto-load existing transcript in detect command - Tested on 2011-03-05 HR1: correctly identifies commercial break at 34:38 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
18 lines
608 B
Python
18 lines
608 B
Python
"""GPU and CUDA library setup for the audio processor."""
|
|
|
|
import os
|
|
from pathlib import Path
|
|
|
|
|
|
def ensure_cuda_libs():
|
|
"""Ensure CUDA 12 libraries are on LD_LIBRARY_PATH.
|
|
|
|
The system has CUDA 13.2 but faster-whisper's ctranslate2 needs CUDA 12.
|
|
Ollama ships CUDA 12 libs at /usr/local/lib/ollama/cuda_v12/.
|
|
"""
|
|
cuda12_path = "/usr/local/lib/ollama/cuda_v12"
|
|
if Path(cuda12_path).exists():
|
|
current = os.environ.get("LD_LIBRARY_PATH", "")
|
|
if cuda12_path not in current:
|
|
os.environ["LD_LIBRARY_PATH"] = f"{cuda12_path}:{current}" if current else cuda12_path
|