From 7271cfe1b8540dedde421c5cb035804c1fe3256d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Dec 2025 19:26:13 -0800 Subject: [PATCH] ... --- ebook2audiobook.cmd | 3 ++- ebook2audiobook.sh | 2 ++ lib/classes/background_detector.py | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ebook2audiobook.cmd b/ebook2audiobook.cmd index cac149a1..72f3678d 100755 --- a/ebook2audiobook.cmd +++ b/ebook2audiobook.cmd @@ -432,7 +432,8 @@ exit /b 0 :install_python_packages echo [ebook2audiobook] Installing dependencies... python -m pip cache purge >nul 2>&1 -python -m pip install --upgrade pip >nul 2>&1 +python -m pip install --upgrade pip pip setuptools wheel >nul 2>&1 +python -m pip install --upgrade llvmlite numba --only-binary=:all: python -m pip install --upgrade --no-cache-dir -r "%SCRIPT_DIR%\requirements.txt" if errorlevel 1 goto :failed for /f "tokens=2 delims=: " %%A in ('pip show torch 2^>nul ^| findstr /b /c:"Version"') do ( diff --git a/ebook2audiobook.sh b/ebook2audiobook.sh index c96be9f6..a28eab41 100755 --- a/ebook2audiobook.sh +++ b/ebook2audiobook.sh @@ -627,6 +627,8 @@ function install_python_packages { echo "[ebook2audiobook] Installing dependencies..." python3 -m pip cache purge > /dev/null 2>&1 python3 -m pip install --upgrade pip > /dev/null 2>&1 + python3 -m pip install --upgrade pip pip setuptools wheel >nul 2>&1 + python3 -m pip install --upgrade llvmlite numba --only-binary=:all: python3 -m pip install --upgrade --no-cache-dir -r "$SCRIPT_DIR/requirements.txt" || exit 1 python3 -m unidic download || exit 1 echo "[ebook2audiobook] Installation completed." diff --git a/lib/classes/background_detector.py b/lib/classes/background_detector.py index c5666f82..29674890 100644 --- a/lib/classes/background_detector.py +++ b/lib/classes/background_detector.py @@ -9,7 +9,7 @@ from lib.models import default_voice_detection_model class BackgroundDetector: - def __init__(self, wav_file:str, hf_token:str|None='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')->None: + def __init__(self, wav_file:str, hf_token:str|None=None)->None: self.wav_file = wav_file device = torch.device("cuda" if torch.cuda.is_available() else "cpu") @@ -17,7 +17,7 @@ class BackgroundDetector: model = Model.from_pretrained( default_voice_detection_model, cache_dir=tts_dir, - use_auth_token=hf_token, + use_auth_token='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', ) self.pipeline = VoiceActivityDetection(segmentation=model)