mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 14:45:46 +01:00
Adding note on ffmpeg + fix for faster whisper on macOS (#882)
This commit is contained in:
parent
ecb85aeb92
commit
a71ec85195
5 changed files with 20 additions and 3 deletions
2
Makefile
2
Makefile
|
|
@ -31,7 +31,7 @@ clean:
|
|||
rm -rf whisper.cpp/build || true
|
||||
rm -rf dist/* || true
|
||||
|
||||
COVERAGE_THRESHOLD := 80
|
||||
COVERAGE_THRESHOLD := 75
|
||||
|
||||
test: buzz/whisper_cpp.py translation_mo
|
||||
pytest -s -vv --cov=buzz --cov-report=xml --cov-report=html --benchmark-skip --cov-fail-under=${COVERAGE_THRESHOLD}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@ OpenAI's [Whisper](https://github.com/openai/whisper).
|
|||
|
||||
**PyPI**:
|
||||
|
||||
Install [ffmpeg](https://www.ffmpeg.org/download.html)
|
||||
|
||||
Install Buzz
|
||||
```shell
|
||||
pip install buzz-captions
|
||||
python -m buzz
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import subprocess
|
|||
import sys
|
||||
import tempfile
|
||||
import warnings
|
||||
import platform
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional, List
|
||||
|
||||
|
|
@ -88,6 +89,13 @@ class ModelType(enum.Enum):
|
|||
(self == ModelType.WHISPER_CPP and not LOADED_WHISPER_CPP_BINARY)
|
||||
):
|
||||
return False
|
||||
elif (
|
||||
# Hide Faster Whisper option on macOS x86_64
|
||||
# See: https://github.com/SYSTRAN/faster-whisper/issues/541
|
||||
(self == ModelType.FASTER_WHISPER
|
||||
and platform.system() == "Darwin" and platform.machine() == "x86_64")
|
||||
):
|
||||
return False
|
||||
return True
|
||||
|
||||
def is_manually_downloadable(self):
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ class TestWhisperFileTranscriber:
|
|||
whisper_model_size=WhisperModelSize.TINY,
|
||||
),
|
||||
marks=pytest.mark.skipif(
|
||||
platform.system() == "Darwin",
|
||||
platform.system() == "Darwin" and platform.machine() == "x86_64",
|
||||
reason="Error with libiomp5 already initialized on GH action runner: https://github.com/chidiwilliams/buzz/actions/runs/4657331262/jobs/8241832087",
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import sys
|
||||
import platform
|
||||
|
||||
import pytest
|
||||
|
||||
|
|
@ -16,6 +16,12 @@ class TestModelTypeComboBox:
|
|||
"Hugging Face",
|
||||
"Faster Whisper",
|
||||
"OpenAI Whisper API",
|
||||
# Faster Whisper is not available on macOS x86_64
|
||||
] if not (platform.system() == "Darwin" and platform.machine() == "x86_64") else [
|
||||
"Whisper",
|
||||
"Whisper.cpp",
|
||||
"Hugging Face",
|
||||
"OpenAI Whisper API",
|
||||
],
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue