Context-aware audio-native endpointing model adapted for Huawei Ascend 910B NPU.
P(<|eot_id|> | context, user_audio) endpointing / VADnpu:0 via torch_npu, verified device placement for model params, waveform and logitsimport subprocess
# NPU inference (real device)
python inference.py --device npu
# CPU baseline
python inference.py --device cpu
# Custom audio
python inference.py --device npu --audio sample.wavinference.py loads local ./model_cache/ultraVAD (or HF cache) with trust_remote_code=True, moves UltravoxModel to npu:0, preprocesses via UltravoxProcessor (16kHz, synthetic 3s audio if no file), runs synchronized forward (torch.npu.synchronize() before/after), extracts audio_pos = audio_token_start_idx + audio_token_len -1 logits and computes P(<|eot_id|>) via softmax.
P(eot) max abs diff < 1e-4, device npu:0 logged for params/inputs/logitstorch.npu.synchronize(), reports ms, RTF and frames/s (see logs)

Hardware: Ascend910_9362 #NPU, torch_npu 2.9.0