Spaces:
Running
Running
File size: 6,043 Bytes
319cf9c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | [build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.uv]
index-strategy = "unsafe-best-match"
required-environments = [
"sys_platform == 'win32' and platform_machine == 'AMD64'",
"sys_platform == 'linux' and platform_machine == 'x86_64'",
"sys_platform == 'darwin' and platform_machine == 'arm64'",
]
override-dependencies = [
"nvidia-nccl-cu12; sys_platform == 'linux'",
]
# uv mặc định cài nhóm `dev`; đặt rỗng để `uv sync` chỉ cài core torch-free.
# Muốn dev/test: `uv sync --group dev`. Muốn GPU: `uv sync --group gpu` hoặc `--extra gpu`.
default-groups = []
[[tool.uv.index]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cu128"
explicit = true
[[tool.uv.index]]
name = "pypi"
url = "https://pypi.org/simple"
[[tool.uv.index]]
name = "llama-cpp-metal"
url = "https://abetlen.github.io/llama-cpp-python/whl/metal/"
explicit = true
[project]
name = "vieneu"
version = "3.0.5"
description = "Advanced on-device Vietnamese TTS with instant voice cloning"
readme = "README_PYPI.md"
license = { file = "LICENSE" }
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Multimedia :: Sound/Audio :: Speech",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Operating System :: OS Independent",
]
keywords = [
"text-to-speech",
"tts",
"vietnamese",
"voice-cloning",
"speech-synthesis",
"real-time",
"on-device"
]
authors = [
{ name = "Phạm Nguyễn Ngọc Bảo", email = "pnnbao@gmail.com" }
]
requires-python = ">=3.10"
# Minimal, TORCH-FREE core. `pip install vieneu` runs VieNeu-TTS v3 Turbo on CPU
# via ONNX Runtime. GPU / older backends (torch, transformers, llama-cpp, lmdeploy,
# librosa) live in the optional [gpu] extra.
dependencies = [
"sea-g2p>=0.7.6", # phonemizer (Rust, torch-free) — needs punc_norm (>=0.7.6)
"onnxruntime>=1.20.0", # runs the v3 transformers + MOSS codec
"numpy",
"soundfile", # audio I/O
"soxr", # lightweight resampling for voice cloning
"tokenizers>=0.20", # phoneme tokenizer (torch-free)
"huggingface_hub", # fetch ONNX / config / tokenizer / voices
"PyYAML", # gradio config.yaml
"gradio>=5.49.1", # web UI (vieneu-web)
"perth>=0.2.0", # optional audio watermark (skipped gracefully if absent)
"google-generativeai>=0.8.6",
"google-genai>=2.9.0",
]
[project.urls]
"Homepage" = "https://github.com/pnnbao97/VieNeu-TTS"
"Repository" = "https://github.com/pnnbao97/VieNeu-TTS"
"Bug Tracker" = "https://github.com/pnnbao97/VieNeu-TTS/issues"
"Documentation" = "https://github.com/pnnbao97/VieNeu-TTS/blob/main/README.md"
"Source Code" = "https://github.com/pnnbao97/VieNeu-TTS"
"Changelog" = "https://github.com/pnnbao97/VieNeu-TTS/releases"
[project.optional-dependencies]
# GPU + older backends (v1/v2 PyTorch & GGUF, v3 Turbo on GPU). Adds the heavy deps
# that the minimal/ONNX install deliberately omits.
gpu = [
"torch",
"torchaudio",
"transformers",
"librosa>=0.11.0",
"neucodec>=0.0.4",
"lmdeploy; sys_platform != 'darwin'",
"triton-windows; sys_platform == 'win32'",
"triton; sys_platform == 'linux'",
"accelerate; sys_platform == 'darwin'",
"llama-cpp-python==0.3.16",
]
[dependency-groups]
dev = [
"pytest",
"pytest-asyncio",
# Test-only deps for the GPU/standard/xpu backend tests (NOT in the runtime
# install — `pip install vieneu` stays minimal/torch-free). CI installs the dev
# group, so these tests can import librosa/transformers/neucodec-based engines.
"librosa>=0.11.0",
"transformers",
"neucodec>=0.0.4",
]
gpu = [
"neucodec>=0.0.4",
"torch==2.8.0",
"torchaudio==2.8.0",
"datasets>=3.2.0",
"perth>=0.2.0",
"lmdeploy; sys_platform != 'darwin'",
"triton-windows; sys_platform == 'win32'",
"triton; sys_platform == 'linux'",
"transformers; sys_platform == 'darwin'",
"accelerate; sys_platform == 'darwin'",
"trafilatura>=2.0.0",
"llama-cpp-python==0.3.16",
]
[tool.pytest.ini_options]
pythonpath = ["src"]
[project.scripts]
vieneu-web = "apps.gradio_main:main"
vieneu-stream = "apps.web_stream:main"
[tool.setuptools]
package-dir = {"" = "src", "apps" = "apps", "examples" = "examples"}
[tool.setuptools.packages.find]
where = ["src", "."]
include = ["vieneu*", "vieneu_utils*", "apps*", "examples*"]
[tool.setuptools.package-data]
vieneu = ["assets/*.json", "assets/samples/*"]
[tool.uv.sources]
torch = [
{ index = "pytorch", marker = "sys_platform != 'darwin'" },
{ index = "pypi", marker = "sys_platform == 'darwin'" }
]
torchaudio = [
{ index = "pytorch", marker = "sys_platform != 'darwin'" },
{ index = "pypi", marker = "sys_platform == 'darwin'" }
]
lmdeploy = [
{ url = "https://github.com/InternLM/lmdeploy/releases/download/v0.11.0/lmdeploy-0.11.0+cu128-cp312-cp312-win_amd64.whl", marker = "sys_platform == 'win32' and python_version == '3.12'" },
{ url = "https://github.com/InternLM/lmdeploy/releases/download/v0.11.0/lmdeploy-0.11.0+cu128-cp312-cp312-manylinux2014_x86_64.whl", marker = "sys_platform == 'linux' and python_version == '3.12'" },
{ index = "pypi", marker = "sys_platform == 'darwin'" }
]
llama-cpp-python = [
{ url = "https://github.com/pnnbao97/VieNeu-TTS/releases/download/wheels-v0.3.16/llama_cpp_python-0.3.16-cp312-cp312-win_amd64.whl", marker = "sys_platform == 'win32' and python_version == '3.12'" },
{ index = "llama-cpp-metal", marker = "sys_platform == 'darwin'" },
{ index = "pypi", marker = "sys_platform != 'win32' and sys_platform != 'darwin'" }
]
|