v25.4.25 -1-

This commit is contained in:
unknown
2025-04-25 06:59:23 -07:00
parent 922897ae5f
commit 6d3bd98a4e
6 changed files with 39 additions and 40 deletions

View File

@@ -1 +1 @@
25.3.22
25.4.25

View File

@@ -16,7 +16,7 @@ set "PYTHONUTF8=1"
set "PYTHONIOENCODING=utf-8"
set "CURRENT_ENV="
set "PROGRAMS_LIST=calibre-normal-cjk ffmpeg nodejs espeak-ng sox"
set "PROGRAMS_LIST=calibre-normal ffmpeg nodejs espeak-ng sox"
set "TMP=%SCRIPT_DIR%\tmp"
set "TEMP=%SCRIPT_DIR%\tmp"
@@ -64,6 +64,7 @@ where /Q scoop
if %errorlevel% neq 0 (
echo Scoop is not installed.
set "SCOOP_CHECK=1"
goto install_components
)
goto conda_check
exit /b
@@ -74,7 +75,7 @@ if %errorlevel% neq 0 (
call rmdir /s /q "%CONDA_INSTALL_DIR%" 2>nul
echo Miniforge3 is not installed.
set "CONDA_CHECK=1"
goto programs_check
goto install_components
)
:: Check if running in a Conda environment
if defined CONDA_DEFAULT_ENV (
@@ -110,7 +111,7 @@ set "missing_prog_array="
for %%p in (%PROGRAMS_LIST%) do (
set "prog=%%p"
if "%%p"=="nodejs" set "prog=node"
if "%%p"=="calibre-normal-cjk" set "prog=calibre"
if "%%p"=="calibre-normal" set "prog=calibre"
where /Q !prog!
if !errorlevel! neq 0 (
echo %%p is not installed.
@@ -130,12 +131,6 @@ if not "%SCOOP_CHECK%"=="0" (
echo Installing Scoop...
call powershell -command "Set-ExecutionPolicy RemoteSigned -scope CurrentUser"
call powershell -command "iwr -useb get.scoop.sh | iex"
where /Q scoop
if !errorlevel! neq 0 (
echo Scoop installation failed.
goto failed
)
call scoop install git
call scoop bucket add muggle https://github.com/hu3rror/scoop-muggle.git
call scoop bucket add extras
@@ -144,32 +139,8 @@ if not "%SCOOP_CHECK%"=="0" (
if "%PROGRAMS_CHECK%"=="0" (
set "SCOOP_CHECK=0"
)
)
:: Install missing packages one by one
if not "%PROGRAMS_CHECK%"=="0" (
echo Installing missing programs...
if "%SCOOP_CHECK%"=="0" (
call scoop bucket add muggle b https://github.com/hu3rror/scoop-muggle.git
call scoop bucket add extras
call scoop bucket add versions
)
for %%p in (%missing_prog_array%) do (
call scoop install %%p
set "prog=%%p"
if "%%p"=="nodejs" (
set "prog=node"
)
if "%%p"=="calibre-normal-cjk" set "prog=calibre"
where /Q !prog!
if !errorlevel! neq 0 (
echo %%p installation failed...
goto failed
)
)
call powershell -command "[System.Environment]::SetEnvironmentVariable('Path', [System.Environment]::GetEnvironmentVariable('Path', 'User') + '%SCOOP_SHIMS%;%SCOOP_APPS%;%CONDA_PATH%;%NODE_PATH%;', 'User')"
set "SCOOP_CHECK=0"
set "PROGRAMS_CHECK=0"
set "missing_prog_array="
start "" cmd /k cd /d "%CD%" ^& call "%~f0"
exit
)
:: Install Conda if not already installed
if not "%CONDA_CHECK%"=="0" (
@@ -186,6 +157,34 @@ if not "%CONDA_CHECK%"=="0" (
del "%CONDA_INSTALLER%"
set "CONDA_CHECK=0"
echo Conda installed successfully.
start "" cmd /k cd /d "%CD%" ^& call "%~f0"
exit
)
:: Install missing packages one by one
if not "%PROGRAMS_CHECK%"=="0" (
echo Installing missing programs...
if "%SCOOP_CHECK%"=="0" (
call scoop bucket add muggle b https://github.com/hu3rror/scoop-muggle.git
call scoop bucket add extras
call scoop bucket add versions
)
for %%p in (%missing_prog_array%) do (
call scoop install %%p
set "prog=%%p"
if "%%p"=="nodejs" (
set "prog=node"
)
if "%%p"=="calibre-normal" set "prog=calibre"
where /Q !prog!
if !errorlevel! neq 0 (
echo %%p installation failed...
goto failed
)
)
call powershell -command "[System.Environment]::SetEnvironmentVariable('Path', [System.Environment]::GetEnvironmentVariable('Path', 'User') + '%SCOOP_SHIMS%;%SCOOP_APPS%;%CONDA_PATH%;%NODE_PATH%;', 'User')"
set "SCOOP_CHECK=0"
set "PROGRAMS_CHECK=0"
set "missing_prog_array="
)
goto dispatch
exit /b

View File

@@ -321,7 +321,7 @@ class TTSManager:
else:
raise TypeError(f"Unsupported type for audio_data: {type(audio_data)}")
def _trim_end(self, audio_data, sample_rate, silence_threshold=0.001, buffer_seconds=0.001):
def _trim_end(self, audio_data, sample_rate, silence_threshold=0.010, buffer_seconds=0.010):
# Ensure audio_data is a PyTorch tensor
if isinstance(audio_data, list):
audio_data = torch.tensor(audio_data) # Convert list to tensor

View File

@@ -626,7 +626,7 @@ def get_chapters(epubBook, session):
def get_sentences(text, lang):
max_tokens = language_mapping[lang]['max_tokens']
max_chars = max_tokens * 10
max_chars = (max_tokens * 10) - 4
pattern_split = [re.escape(p) for p in punctuation_split]
pattern = f"({'|'.join(pattern_split)})"

View File

@@ -52,7 +52,7 @@ dependencies = [
"torchvggish"
]
readme = "README.md"
requires-python = ">3.11,<3.13"
requires-python = ">3.9,<3.13"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",

View File

@@ -29,7 +29,7 @@ class PostInstallCommand(install):
setup(
name='ebook2audiobook',
version=get_version(),
python_requires=">3.11,<3.13",
python_requires=">3.9,<3.13",
author="Drew Thomasson",
description="Convert eBooks to audiobooks with chapters and metadata",
long_description=long_description,