Commit 9fa2a59
test: rename test_asr_mlx_whisper.py to test_asr.py and add WhisperS2T tests
Rename the test file to reflect that it now covers all ASR backends
(MLX, Native, and WhisperS2T), not just MLX. Add comprehensive mock
tests for the WhisperS2T backend including:
- Options creation and defaults
- Auto-selection logic (CUDA, CPU fallback, native fallback, MLX priority)
- Model initialization and import error handling
- Device string parsing
- Transcription with and without word timestamps
- Empty output handling
- Run success/failure paths and BytesIO input
- large-v3 n_mels=128 verification
- Pipeline integration
Also fix existing MLX/native selection tests to properly mock whisper_s2t
as unavailable when testing the native Whisper fallback path.
Signed-off-by: BBC <bbc@chintellalaw.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent d66e4b5 commit 9fa2a59
2 files changed
Lines changed: 958 additions & 359 deletions
0 commit comments