fix: suppress numpy Pylance false positive in wakeword_bench.py
numpy is a runtime dep bundled in the .deb venv but not in the dev .venv, so Pylance can't resolve it at edit time. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9022b17186
commit
4f68eda501
@ -247,7 +247,7 @@ def probe(tts_url: str, *, model: str, voice: str, api_key_env: str = "",
|
|||||||
|
|
||||||
def _wav_to_pcm16k(wav_bytes: bytes) -> bytes:
|
def _wav_to_pcm16k(wav_bytes: bytes) -> bytes:
|
||||||
"""Decode a WAV blob to 16 kHz mono signed-16 PCM (linear resample)."""
|
"""Decode a WAV blob to 16 kHz mono signed-16 PCM (linear resample)."""
|
||||||
import numpy as np
|
import numpy as np # type: ignore[import-untyped]
|
||||||
|
|
||||||
with wave.open(io.BytesIO(wav_bytes), "rb") as w:
|
with wave.open(io.BytesIO(wav_bytes), "rb") as w:
|
||||||
ch, width, rate, n = w.getnchannels(), w.getsampwidth(), w.getframerate(), w.getnframes()
|
ch, width, rate, n = w.getnchannels(), w.getsampwidth(), w.getframerate(), w.getnframes()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user