Gregniuki commited on
Commit
99f9967
1 Parent(s): 17b516a

Upload 9 files

Browse files
content/piper/src/python/Dockerfile.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ FROM nvcr.io/nvidia/pytorch:22.03-py3
2
+
3
+ RUN pip3 install \
4
+ 'pytorch-lightning~=1.7.0'
5
+
6
+ ENV NUMBA_CACHE_DIR=.numba_cache
content/piper/src/python/README.md ADDED
File without changes
content/piper/src/python/build_monotonic_align.sh ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -eo pipefail
3
+
4
+ this_dir="$( cd "$( dirname "$0" )" && pwd )"
5
+
6
+ if [ -d "${this_dir}/.venv" ]; then
7
+ source "${this_dir}/.venv/bin/activate"
8
+ fi
9
+
10
+ cd "${this_dir}/piper_train/vits/monotonic_align"
11
+ mkdir -p monotonic_align
12
+ cythonize -i core.pyx
13
+ mv core*.so monotonic_align/
content/piper/src/python/dockerignore.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ *
content/piper/src/python/mypy.ini.txt ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ [mypy]
3
+
4
+ [mypy-setuptools.*]
5
+ ignore_missing_imports = True
6
+
7
+ [mypy-librosa.*]
8
+ ignore_missing_imports = True
9
+
10
+ [mypy-onnxruntime.*]
11
+ ignore_missing_imports = True
content/piper/src/python/requirements 2.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ cython>=0.29.0,<1
2
+ piper-phonemize~=1.1.0
3
+ librosa>=0.9.2,<1
4
+ numpy>=1.19.0
5
+ onnxruntime>=1.11.0
6
+ pytorch-lightning~=1.7.0
7
+ torch>=1.11.0,<2
content/piper/src/python/requirements_dev.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ black==22.3.0
2
+ coverage==5.0.4
3
+ flake8==3.7.9
4
+ mypy==0.910
5
+ pylint==2.10.2
6
+ pytest==5.4.1
7
+ pytest-cov==2.8.1
content/piper/src/python/run-docker.txt ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+
3
+ # Follow instructions here: https://docs.docker.com/config/containers/resource_constraints/#access-an-nvidia-gpu
4
+ docker run \
5
+ -it \
6
+ --gpus all \
7
+ -w "$PWD" \
8
+ --user "$(id -u):$(id -g)" \
9
+ --ipc=host \
10
+ -v "${HOME}:${HOME}" \
11
+ -v /media/cache:/media/cache:ro \
12
+ -v /etc/hostname:/etc/hostname:ro \
13
+ -v /etc/localtime:/etc/localtime:ro \
14
+ larynx2-train \
15
+ "$@"
content/piper/src/python/setup.py ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ from collections import defaultdict
3
+ from pathlib import Path
4
+
5
+ import setuptools
6
+ from setuptools import setup
7
+
8
+ this_dir = Path(__file__).parent
9
+ module_dir = this_dir / "piper_train"
10
+
11
+ # -----------------------------------------------------------------------------
12
+
13
+ # Load README in as long description
14
+ long_description: str = ""
15
+ readme_path = this_dir / "README.md"
16
+ if readme_path.is_file():
17
+ long_description = readme_path.read_text(encoding="utf-8")
18
+
19
+ requirements = []
20
+ requirements_path = this_dir / "requirements.txt"
21
+ if requirements_path.is_file():
22
+ with open(requirements_path, "r", encoding="utf-8") as requirements_file:
23
+ requirements = requirements_file.read().splitlines()
24
+
25
+ version_path = module_dir / "VERSION"
26
+ with open(version_path, "r", encoding="utf-8") as version_file:
27
+ version = version_file.read().strip()
28
+
29
+ # -----------------------------------------------------------------------------
30
+
31
+ setup(
32
+ name="piper_train",
33
+ version=version,
34
+ description="A fast and local neural text to speech system",
35
+ long_description=long_description,
36
+ url="http://github.com/rhasspy/piper",
37
+ author="Michael Hansen",
38
+ author_email="[email protected]",
39
+ license="MIT",
40
+ packages=setuptools.find_packages(),
41
+ package_data={
42
+ "piper_train": ["VERSION", "py.typed"],
43
+ },
44
+ install_requires=requirements,
45
+ extras_require={':python_version<"3.9"': ["importlib_resources"]},
46
+ entry_points={
47
+ "console_scripts": [
48
+ "piper-train = piper_train.__main__:main",
49
+ ]
50
+ },
51
+ classifiers=[
52
+ "Development Status :: 3 - Alpha",
53
+ "Intended Audience :: Developers",
54
+ "Topic :: Text Processing :: Linguistic",
55
+ "License :: OSI Approved :: MIT License",
56
+ "Programming Language :: Python :: 3.7",
57
+ "Programming Language :: Python :: 3.8",
58
+ "Programming Language :: Python :: 3.9",
59
+ ],
60
+ keywords="rhasspy tts speech voice",
61
+ )