Commit 21a35cf
committed
test: add WhisperS2T backend tests and fix native fallback mocking
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>1 parent fec2ef8 commit 21a35cf
1 file changed
Lines changed: 597 additions & 3 deletions
0 commit comments