From 08ae8ba43f82a665c37f0292123bc88c9784d030 Mon Sep 17 00:00:00 2001 From: Raivis Dejus Date: Fri, 16 Jan 2026 11:18:27 +0200 Subject: [PATCH] Fix for HF hub download certificates (#1353) --- README.ja_JP.md | 6 ------ README.md | 6 ------ buzz/file_transcriber_queue_worker.py | 1 + buzz/model_loader.py | 14 ++++++++++++++ .../speaker_identification_widget.py | 1 + docs/docs/index.md | 2 +- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.ja_JP.md b/README.ja_JP.md index 6ef46be9..9990e5e6 100644 --- a/README.ja_JP.md +++ b/README.ja_JP.md @@ -40,12 +40,6 @@ アプリは署名されていないため、インストール時に警告が表示されます。`詳細情報` -> `実行`を選択してください。 -**または、[winget](https://learn.microsoft.com/ja-jp/windows/package-manager/winget/)でインストール** - -```shell -winget install ChidiWilliams.Buzz -``` - ### Linux Buzzは[Flatpak](https://flathub.org/apps/io.github.chidiwilliams.Buzz)または[Snap](https://snapcraft.io/buzz)として利用可能です。 diff --git a/README.md b/README.md index 17abf7c5..bf2498b1 100644 --- a/README.md +++ b/README.md @@ -43,12 +43,6 @@ Get the installation files from the [SourceForge](https://sourceforge.net/projec App is not signed, you will get a warning when you install it. Select `More info` -> `Run anyway`. -**Alternatively, install with [winget](https://learn.microsoft.com/en-us/windows/package-manager/winget/)** - -```shell -winget install ChidiWilliams.Buzz -``` - ### Linux Buzz is available as a [Flatpak](https://flathub.org/apps/io.github.chidiwilliams.Buzz) or a [Snap](https://snapcraft.io/buzz). diff --git a/buzz/file_transcriber_queue_worker.py b/buzz/file_transcriber_queue_worker.py index 9776efd4..1babc641 100644 --- a/buzz/file_transcriber_queue_worker.py +++ b/buzz/file_transcriber_queue_worker.py @@ -12,6 +12,7 @@ from uuid import UUID # This must be done before importing demucs which uses torch.hub with urllib try: import certifi + os.environ.setdefault('REQUESTS_CA_BUNDLE', certifi.where()) os.environ.setdefault('SSL_CERT_FILE', certifi.where()) os.environ.setdefault('SSL_CERT_DIR', os.path.dirname(certifi.where())) # Also update the default SSL context for urllib diff --git a/buzz/model_loader.py b/buzz/model_loader.py index 4cf4d0d0..6f41b0e3 100644 --- a/buzz/model_loader.py +++ b/buzz/model_loader.py @@ -7,8 +7,22 @@ import threading import shutil import subprocess import sys +import ssl import warnings import platform + +# Fix SSL certificate verification for bundled applications (macOS, Windows). +# This must be done before importing libraries that make HTTPS requests. +try: + import certifi + os.environ.setdefault("REQUESTS_CA_BUNDLE", certifi.where()) + os.environ.setdefault("SSL_CERT_FILE", certifi.where()) + os.environ.setdefault("SSL_CERT_DIR", os.path.dirname(certifi.where())) + # Also update the default SSL context for urllib + ssl._create_default_https_context = lambda: ssl.create_default_context(cafile=certifi.where()) +except ImportError: + pass + import requests import whisper import huggingface_hub diff --git a/buzz/widgets/transcription_viewer/speaker_identification_widget.py b/buzz/widgets/transcription_viewer/speaker_identification_widget.py index 67408256..bd179a5d 100644 --- a/buzz/widgets/transcription_viewer/speaker_identification_widget.py +++ b/buzz/widgets/transcription_viewer/speaker_identification_widget.py @@ -10,6 +10,7 @@ from typing import Optional # This must be done before importing libraries that download from Hugging Face try: import certifi + os.environ.setdefault('REQUESTS_CA_BUNDLE', certifi.where()) os.environ.setdefault('SSL_CERT_FILE', certifi.where()) os.environ.setdefault('SSL_CERT_DIR', os.path.dirname(certifi.where())) # Also update the default SSL context for urllib diff --git a/docs/docs/index.md b/docs/docs/index.md index adfa1920..27600e0a 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -20,7 +20,7 @@ OpenAI's [Whisper](https://github.com/openai/whisper). real-time, [Demo](https://www.loom.com/share/564b753eb4d44b55b985b8abd26b55f7)) - Presentation window for easy accessibility during events and presentations - [Realtime translation](https://chidiwilliams.github.io/buzz/docs/usage/translations) with OpenAI API compatible AI -- [Advanced Transcription Viewer](https://chidiwilliams.github.io/buzz/docs/usage/transcription_viewer)** with search, playback controls, and speed adjustment +- [Advanced Transcription Viewer](https://chidiwilliams.github.io/buzz/docs/usage/transcription_viewer) with search, playback controls, and speed adjustment - **Smart Interface** with conditional visibility and state persistence - **Professional Controls** including loop segments, follow audio, and keyboard shortcuts - Supports [Whisper](https://github.com/openai/whisper#available-models-and-languages),