mirror of
https://github.com/chidiwilliams/buzz.git
synced 2024-06-29 05:00:21 +02:00
Re-enable whisper.cpp on Windows (#155)
This commit is contained in:
parent
3de06b0e6f
commit
a1b9097133
|
@ -78,6 +78,6 @@ app = BUNDLE(
|
|||
info_plist={
|
||||
'NSPrincipalClass': 'NSApplication',
|
||||
'NSHighResolutionCapable': 'True',
|
||||
'NSMicrophoneUsageDescription': 'Please provide microphone access'
|
||||
'NSMicrophoneUsageDescription': 'Allow Buzz to record audio from your microphone.'
|
||||
}
|
||||
)
|
||||
|
|
8
Makefile
8
Makefile
|
@ -43,7 +43,7 @@ clean:
|
|||
rm -rf dist/* || true
|
||||
|
||||
test: whisper_cpp.py
|
||||
pytest --cov --cov-fail-under=70 --cov-report html
|
||||
pytest --cov --cov-fail-under=69 --cov-report html
|
||||
|
||||
dist/Buzz: whisper_cpp.py
|
||||
pyinstaller --noconfirm Buzz.spec
|
||||
|
@ -62,10 +62,14 @@ ifeq ($(UNAME_S),Darwin)
|
|||
ifeq (,$(findstring AVX2,$(AVX2_M)))
|
||||
CMAKE_FLAGS += -DWHISPER_NO_AVX2=ON
|
||||
endif
|
||||
else
|
||||
ifeq ($(OS), Windows_NT)
|
||||
CMAKE_FLAGS += -DBUILD_SHARED_LIBS=ON
|
||||
endif
|
||||
endif
|
||||
|
||||
$(LIBWHISPER):
|
||||
cmake -S whisper.cpp -B whisper.cpp/build/ $(CMAKE_FLAGS) -DBUILD_SHARED_LIBS=ON
|
||||
cmake -S whisper.cpp -B whisper.cpp/build/ $(CMAKE_FLAGS)
|
||||
cmake --build whisper.cpp/build --verbose
|
||||
cp whisper.cpp/build/$(LIBWHISPER) . || true
|
||||
cp whisper.cpp/build/bin/Debug/$(LIBWHISPER) . || true
|
||||
|
|
27
gui.py
27
gui.py
|
@ -538,8 +538,6 @@ class Settings(QSettings):
|
|||
super().__init__('Buzz', 'Buzz', parent, *args)
|
||||
|
||||
def enable_ggml_inference(self):
|
||||
if platform.system() == 'Windows':
|
||||
return False
|
||||
return self.value(self.ENABLE_GGML_INFERENCE, False)
|
||||
|
||||
|
||||
|
@ -782,22 +780,21 @@ class MainWindow(QMainWindow):
|
|||
self.about_action = QAction(f'&About {APP_NAME}', self)
|
||||
self.about_action.triggered.connect(self.on_trigger_about_action)
|
||||
|
||||
self.help_menu = menu.addMenu("&Help")
|
||||
self.help_menu.addAction(self.about_action)
|
||||
|
||||
self.settings = Settings(self)
|
||||
|
||||
if platform.system() != 'Windows':
|
||||
enable_ggml_inference_action = QAction(
|
||||
'&Enable GGML Inference', self)
|
||||
enable_ggml_inference_action.setCheckable(True)
|
||||
enable_ggml_inference_action.setChecked(
|
||||
bool(self.settings.enable_ggml_inference()))
|
||||
enable_ggml_inference_action.triggered.connect(
|
||||
self.on_toggle_enable_ggml_inference)
|
||||
enable_ggml_inference_action = QAction(
|
||||
'&Enable GGML Inference', self)
|
||||
enable_ggml_inference_action.setCheckable(True)
|
||||
enable_ggml_inference_action.setChecked(
|
||||
bool(self.settings.enable_ggml_inference()))
|
||||
enable_ggml_inference_action.triggered.connect(
|
||||
self.on_toggle_enable_ggml_inference)
|
||||
|
||||
settings_menu = menu.addMenu("&Settings")
|
||||
settings_menu.addAction(enable_ggml_inference_action)
|
||||
settings_menu = menu.addMenu("&Settings")
|
||||
settings_menu.addAction(enable_ggml_inference_action)
|
||||
|
||||
self.help_menu = menu.addMenu("&Help")
|
||||
self.help_menu.addAction(self.about_action)
|
||||
|
||||
def on_import_audio_file_action(self):
|
||||
(file_path, _) = QFileDialog.getOpenFileName(
|
||||
|
|
Loading…
Reference in a new issue