"""Mira4Tech practice: reads only the supplied mono 16kHz PCM16 WAV. Initial model download uses Hugging Face. Transcription then runs locally. Run inside a virtual environment with faster-whisper 1.2.1 and numpy 2.5.4. No file deletion, shell execution or API key is used. """ from pathlib import Path import wave import numpy as np from faster_whisper import WhisperModel folder = Path(__file__).resolve().parent audio = folder / 'mira4tech-arabic-synthetic.wav' with wave.open(str(audio), 'rb') as source: if (source.getnchannels(), source.getframerate(), source.getsampwidth()) != (1, 16000, 2): raise ValueError('Use the supplied mono 16kHz PCM16 practice WAV unchanged.') samples = np.frombuffer(source.readframes(source.getnframes()), dtype='