Diarization: CPU with 8 threads and progress, drop CUDA attempt

- 8 threads (sherpa-onnx default is 1): 40-min call >10 min -> ~6 min.
- CUDA provider measured slower (>7 min, GPU ~5 W): tiny models and one
  embedding per segment (3474 here), so transfer/launch overhead dominates.
  Reverted the cuda12.cudnn9 wheel and extra nvidia-* deps.
- Progress callback prints every 10 % (segmentation, then embeddings).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pinokio
2026-11-02 15:40:11 +01:00
co-authored by Claude Opus 5.5
parent a64d3fb275
commit d9ec9c5b01
2 changed files with 20 additions and 19 deletions
+1 -3
View File
@@ -1,8 +1,6 @@
# /// script
# requires-python = ">=3.10,<3.13"
# dependencies = ["prefect>=3", "faster-whisper", "av>=14,<17", "nvidia-cublas-cu12", "nvidia-cudnn-cu12==9.*", "nvidia-cuda-runtime-cu12", "nvidia-cufft-cu12", "sherpa-onnx==2.0.1+cuda12.cudnn9", "numpy", "imagehash", "Pillow", "markdown", "openvino-genai", "huggingface_hub"]
# [tool.uv]
# find-links = ["https://k2-fsa.github.io/sherpa/onnx/cuda.html"] # sherpa-onnx CUDA wheels (diarization on GPU, CPU fallback in diarize.py)
# dependencies = ["prefect>=3", "faster-whisper", "av>=14,<17", "nvidia-cublas-cu12", "nvidia-cudnn-cu12==9.*", "sherpa-onnx", "numpy", "imagehash", "Pillow", "markdown", "openvino-genai", "huggingface_hub"]
# ///
"""Meeting pipeline. uv run --script flow.py <name> [--from STEP] [--speakers N] [--device cuda|npu] [--bench-npu]"""
import os