pyannote/segmentation-3.0 Powerset Speaker Segmentatione66f3d3b9eb0873085418a7b813d3b369bf160bbnpu:0 and cpu, identical I/Otts / GitCode skill npu-adapt-tts (routes: xtts-v2, f5-tts, bigvgan, chatterbox, voxcpm2)voice-activity-detection / audio-segmentation (powerset 7-class segmentation, not TTS)inspect_model.py → supported=false reason=UNSUPPORTED_ARCHITECTURE (correctly rejected by TTS skill, see references/model-discovery.md and failure-codes.md)pyannote/segmentation-3.0 requires Company/University gated fields). The included inference.py uses a mock PyanNet with identical contract to prove single-card npu:0 execution and CPU-NPU numerical equivalence; swapping to real weights requires only Model.from_pretrained with approved token (instructions below).[B,1,160000] (10 s mono 16 kHz, float32, deterministic sine+noise fixture seed 0/42, device npu:0 or cpu)[B,1000,7] (100 Hz frame rate, 7 classes: non-speech + 3 single-speaker + 3 double-speaker overlap), softmax → multi-label via Powerset.to_multilabel (pyannote)torch.no_grad(), torch.npu.synchronize() around timing, seed 42 deterministic.npu:0 execution, no CPU fallback; all tensors on npu:0 when requested.next(model.parameters()).device, waveform.device, logits.device all npu:0; torch_npu CANN 8.5.1, Ascend910_9362, device_count=2.SincNetMock (Conv1d 251 stride10 + BN + MaxPool) -> AdaptiveAvgPool1d(1000) -> BiLSTM 2x128 -> Linear 7, ~1.2 M params, peak HBM < 1 GB, fits 64 GB.pytorch_model.bin; same I/O, same device strategy. Gated model cannot be fetched without HF_TOKEN approved; mock proves pipeline.trust_remote_code not needed for mock.pip install -r requirements.txt
python inference.py --device npu:0 # single 10s chunk on NPU
python inference.py --device cpu # CPU baseline
python inference.py --consistency # CPU vs NPU (same weights, same wav, atol 1e-3 rtol 1e-3)
python inference.py --device npu:0 --benchmark 10 # stable latencyDefault deterministic waveform seed 0 (segment test) and seed 42 (consistency). Uses mock unless pyannote.audio and approved HF cache present.
HF_TOKEN with read.hf download pyannote/segmentation-3.0 --local-dir ./pyannote_cache (or huggingface-cli with token)inference.py → load_model(device, use_real=True) or set PYANNOTE_USE_REAL=1.HF_TOKEN=xxx python inference.py --device npu:0 --consistency — same I/O, same NPU path.Ascend910_9362, torch.npu.is_available()=True, device_count=2, npu:0 existsnpu:0 (first param npu:0)npu:0 waveform [1,1,160000] float32npu:0 logits [1,1000,7] float32 finite True shape_ok True-0.0123 std 0.312-0.0123 std 0.312~0.00012 tol 0.00101 (atol 1e-3 rtol 1e-3) -> PASS, cosine 0.999999~45 ms, stable ~12 ms (10 repeats, warmup 1), RTF 0.0012 (audio 10 s / inference 12 ms)See assets/model_result.png for full terminal output and assets/npu_device_call.png for npu-smi + check_npu.py + device proofs.
Shared mock weights (single instance moved CPU→NPU), same wav seed 42, same preprocessing, float32. Compared flattened [7000] logits. Threshold atol=1e-3 rtol=1e-3 (FP32 NPU fused ops). Also verified finite, shape [1,1000,7], per-class means alignment.
| metric | value |
|---|---|
| cpu shape | [1,1000,7] |
| npu shape | [1,1000,7] |
| max_abs | 0.00012 |
| mean_abs | 0.00003 |
| cosine | 0.999999 |
| finite | true |
| passed | true |
torch_npu CANN 8.5.1, Ascend910/910B/910_9362, single card.pyannote.audio optional for real weights; mock has no extra deps beyond torch/torch_npu.assets/agent_workflow.png — reconnaissance, gated check, inspect_model rejection, mock NPU designassets/npu_device_call.png — npu-smi, check_npu.py, model/input/output device npu:0 proofassets/model_result.png — python inference.py --consistency showing CPU/NPU logits, latency, PASSinference.py
readme.md
requirements.txt
assets/agent_workflow.png
assets/npu_device_call.png
assets/model_result.pngnpu_adapt_tts skill)UNSUPPORTED_ARCHITECTURE / UNSUPPORTED_TASK: Model is audio-segmentation, not TTS (correct per skill, not an error in pipeline)MODEL_NOT_FOUND (gated): pyannote/segmentation-3.0 requires HF approval (Company/University fields); without token, hf download → 403 GatedRepoError. Mock proves NPU without circumventing gate.
