Repository navigation
Expand file tree
/
Copy pathsetup.py
More file actions
170 lines (166 loc) · 5.27 KB
/
Copy pathsetup.py
File metadata and controls
170 lines (166 loc) · 5.27 KB
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
"""Needed so package data is included."""
import itertools
from pathlib import Path
from skbuild import setup
MODULE_DIR = Path(__file__).parent / "src" / "piper"
PIPER_DATA_FILES = ["py.typed", "espeakbridge.pyi"]
ESPEAK_NG_DATA_DIR = MODULE_DIR / "espeak-ng-data"
ESPEAK_NG_DATA_FILES = [
f.relative_to(MODULE_DIR) for f in ESPEAK_NG_DATA_DIR.rglob("*") if f.is_file()
]
TASHKEEL_DATA_DIR = MODULE_DIR / "tashkeel"
TASHKEEL_DATA_FILES = [
(TASHKEEL_DATA_DIR / f_name).relative_to(MODULE_DIR)
for f_name in (
"model.onnx",
"input_id_map.json",
"target_id_map.json",
"hint_id_map.json",
)
]
HEBREW_DATA_DIR = MODULE_DIR / "hebrew"
HEBREW_DATA_FILES = [
(HEBREW_DATA_DIR / f_name).relative_to(MODULE_DIR)
for f_name in (
"nakdimon.onnx",
"LICENSE",
"SOURCE",
)
]
LITHUANIAN_DATA_DIR = MODULE_DIR / "lithuanian"
LITHUANIAN_DATA_FILES = [
(LITHUANIAN_DATA_DIR / f_name).relative_to(MODULE_DIR)
for f_name in (
"lt_kirciai.tsv",
"lt_raides.tsv",
"lt_kreipiniai.tsv",
"LICENSE",
"SOURCE",
)
]
# Web page and images for the HTTP server
HTTP_DATA_FILES = [
f.relative_to(MODULE_DIR)
for f in itertools.chain(
(MODULE_DIR / "templates").rglob("*"),
(MODULE_DIR / "img").rglob("*"),
)
if f.is_file()
]
setup(
name="piper-tts",
version="1.8.0",
description="Fast and local neural text-to-speech engine",
url="http://github.com/OHF-voice/piper1-gpl",
license="GPL-3.0-or-later",
# g2pW is Apache-2.0; see src/piper/g2pw_onnx.py.
license_files=["COPYING", "licenses/LICENSE.g2pW-Apache-2.0"],
author="The Home Assistant Authors",
author_email="hello@home-assistant.io",
keywords=["home", "assistant", "tts", "text-to-speech"],
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Topic :: Multimedia :: Sound/Audio :: Speech",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
python_requires=">=3.9",
install_requires=[
"onnxruntime>=1,<2",
"pathvalidate>=3,<4",
],
extras_require={
"train": [
# 2.5 added the dynamo argument to torch.onnx.export
"torch>=2.5,<3",
"lightning>=2,<3",
"tensorboard>=2,<3",
"tensorboardX>=2,<3",
"jsonargparse[signatures]>=4.27.7",
"onnx>=1,<2",
"pysilero-vad>=2.1,<3",
"cython>=3,<4",
"librosa<1",
],
"dev": [
"black==24.8.0",
"flake8==7.1.1",
"isort==5.13.2", # used by script/lint and script/format
"mypy==1.14.0",
"pylint==3.2.7",
"pytest==8.3.4",
"build==1.2.2",
"scikit-build<1",
"cmake>=3.18,<4",
"ninja>=1,<2",
"onnx>=1,<2", # for alignments
],
"http": [
"flask>=3,<4",
],
"alignment": [
"onnx>=1,<2",
],
"zh": [
# g2pW supplies the pinyin/bopomofo lookup tables. Its model is run
# by piper.g2pw_onnx rather than g2pw.api, which is what keeps torch
# (~750 MB) out of this extra: g2pw.api imports it for a DataLoader.
"g2pW>=0.1.1,<1",
"transformers>=4,<6",
"sentence-stream>=1.2.1,<2",
"unicode-rbnf>=2.4.0,<3",
],
"ja": [
"pyopenjtalk-plus>=0.4,<1",
],
"th": [
# Thai word segmentation + G2P. espeak-ng's Thai voice is a
# placeholder (see piper.phonemize_thai) and cannot be trained on.
# Capped below 1.11: that release pins "scikit-learn~=1.2.0", which
# has no wheels for current Pythons and whose compiled extensions
# predate the numpy 2 ABI, so it builds from source and then dies
# with "numpy.dtype size changed" on import. 1.10 leaves
# scikit-learn unpinned. Lift the cap once tltk relaxes it.
"tltk>=1.6.8,<1.11",
# tltk imports pandas and requests but declares neither (as of
# 1.10). requests is pulled in by tltk/__init__.py -> tltk.corpus,
# which runs even though we only use tltk.nlp.
"pandas>=2,<3",
"requests>=2,<3",
"unicode-rbnf>=2.4.0,<3",
],
},
packages=[
"piper",
"piper.tashkeel",
"piper.hebrew",
"piper.train",
"piper.train.vits",
"piper.train.vits.monotonic_align",
],
package_dir={"": "src"},
include_package_data=True,
package_data={
"piper": [
str(p)
for p in itertools.chain(
PIPER_DATA_FILES,
ESPEAK_NG_DATA_FILES,
TASHKEEL_DATA_FILES,
HEBREW_DATA_FILES,
LITHUANIAN_DATA_FILES,
HTTP_DATA_FILES,
)
],
},
cmake_install_dir="src/piper",
entry_points={
"console_scripts": [
"piper = piper.__main__:main",
]
},
)