forked from voice-cloning-app/Voice-Cloning-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_exe.py
34 lines (32 loc) · 1.24 KB
/
build_exe.py
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
import os
import shutil
import PyInstaller.__main__
from PyInstaller.utils.hooks import get_package_paths
if __name__ == "__main__":
assert os.path.isfile("ffmpeg\\bin\\ffmpeg.exe")
assert os.path.isfile("en_v5.jit")
pytorch_libs = os.path.join(get_package_paths("torch")[1], "lib")
PyInstaller.__main__.run(
[
"main.py",
"--onefile",
"--clean",
"--icon=application\static\\favicon\\app-icon.ico",
"--add-data=application/static;application/static",
"--add-data=alphabets;alphabets",
"--add-data=training/hifigan;training/hifigan",
"--additional-hooks=extra-hooks",
"--hidden-import=sklearn.utils._weight_vector",
"--hidden-import=sklearn.utils._cython_blas",
"--hidden-import=sklearn.neighbors._typedefs",
"--hidden-import=sklearn.neighbors._quad_tree",
"--hidden-import=sklearn.tree._utils",
"--hidden-import=sklearn.tree",
"--hidden-import=scipy.special.cython_special",
"--add-data=ffmpeg/bin/ffmpeg.exe;.",
"--add-data=en_v5.jit;.",
"--add-data",
pytorch_libs + ";.",
]
)
shutil.rmtree("build")