Closed
Description
Description
The app defaults to an unsupported compute_type
(float16
) when running on a CPU-only system. To fix that, the user has to explicitly append --compute_type int8
to the call command each time the application runs. This feature provides a fix including the automatic assignment of the compatible compute type (int8
) on a CPU-only system.
Reproduce
Call python3 main.py
on CPU-only system:
$ python3 main.py
<...>
torchaudio.set_audio_backend("soundfile")
torchvision is not available - cannot save figures
Initialize logger for main
xxx 14:44:17,420 - main - DEBUG - Loading models...
xxx 14:44:17,420 - main - INFO - Using CPU
<...>
xxx 14:44:17,422 - main - DEBUG - * Loading Speaker Diarization Model
xxx 14:45:09,498 - main - DEBUG - * Loading ASR Model
--------------------------------------------------------------------------------------------------------------------------------------------------------
main.py 526 <module>
asr_model = whisper_asr.load_asr_model(
whisper_asr.py 234 load_asr_model
model = model or WhisperModel(
transcribe.py 133 __init__
self.model = ctranslate2.models.Whisper(
ValueError:
Requested float16 compute type, but the target device or backend do not support efficient float16 computation.
The error was expected to occur since according to whisperX documentation, whisperX
expects compute type to be int8
.
To run on CPU instead of GPU (and for running on Mac OS X): whisperx examples/sample01.wav --compute_type int8
Implementation can be found in pull request #383 .