Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mrywhh
Real-Time-Voice-Cloning
提交
7432046e
R
Real-Time-Voice-Cloning
项目概览
mrywhh
/
Real-Time-Voice-Cloning
落后 Fork 源项目 12 个版本
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Real-Time-Voice-Cloning
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
7432046e
编写于
9月 25, 2021
作者:
T
Tomcattwo
提交者:
GitHub
9月 25, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor bug fixes and changes for improved Windows compatibility
上级
95adc699
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
13 addition
and
12 deletion
+13
-12
README.md
README.md
+1
-1
demo_cli.py
demo_cli.py
+1
-1
demo_toolbox.py
demo_toolbox.py
+1
-1
synthesizer/synthesize.py
synthesizer/synthesize.py
+5
-5
synthesizer/train.py
synthesizer/train.py
+2
-1
vocoder/train.py
vocoder/train.py
+2
-2
vocoder_preprocess.py
vocoder_preprocess.py
+1
-1
未找到文件。
README.md
浏览文件 @
7432046e
...
...
@@ -38,7 +38,7 @@ SV2TTS is a three-stage deep learning framework that allows to create a numerica
**Python 3.6 or 3.7**
is needed to run the toolbox.
*
Install
[
PyTorch
](
https://pytorch.org/get-started/locally/
)
(
>=1.
0.1
)
.
*
Install
[
PyTorch
](
https://pytorch.org/get-started/locally/
)
(
>=1.
1.0
)
.
*
Install
[
ffmpeg
](
https://ffmpeg.org/download.html#get-packages
)
.
*
Run
`pip install -r requirements.txt`
to install the remaining necessary packages.
...
...
demo_cli.py
浏览文件 @
7432046e
...
...
@@ -43,7 +43,7 @@ if __name__ == '__main__':
if
args
.
cpu
:
# Hide GPUs from Pytorch to force CPU processing
os
.
environ
[
"CUDA_VISIBLE_DEVICES"
]
=
""
os
.
environ
[
"CUDA_VISIBLE_DEVICES"
]
=
"
-1
"
if
not
args
.
no_mp3_support
:
try
:
...
...
demo_toolbox.py
浏览文件 @
7432046e
...
...
@@ -32,7 +32,7 @@ if __name__ == '__main__':
if
args
.
cpu
:
# Hide GPUs from Pytorch to force CPU processing
os
.
environ
[
"CUDA_VISIBLE_DEVICES"
]
=
""
os
.
environ
[
"CUDA_VISIBLE_DEVICES"
]
=
"
-1
"
del
args
.
cpu
## Remind the user to download pretrained models if needed
...
...
synthesizer/synthesize.py
浏览文件 @
7432046e
...
...
@@ -8,13 +8,13 @@ from synthesizer.utils.symbols import symbols
import
numpy
as
np
from
pathlib
import
Path
from
tqdm
import
tqdm
import
platform
def
run_synthesis
(
in_dir
,
out_dir
,
model_dir
,
hparams
):
# This generates ground truth-aligned mels for vocoder training
synth_dir
=
Path
(
out_dir
).
joinpath
(
"mels_gta"
)
synth_dir
.
mkdir
(
exist_ok
=
True
)
print
(
hparams_debug_string
(
hparams
))
print
(
hparams_debug_string
())
# Check for GPU
if
torch
.
cuda
.
is_available
():
...
...
@@ -62,9 +62,9 @@ def run_synthesis(in_dir, out_dir, model_dir, hparams):
dataset
=
SynthesizerDataset
(
metadata_fpath
,
mel_dir
,
embed_dir
,
hparams
)
data_loader
=
DataLoader
(
dataset
,
collate_fn
=
lambda
batch
:
collate_synthesizer
(
batch
,
r
),
collate_fn
=
lambda
batch
:
collate_synthesizer
(
batch
,
r
,
hparams
),
batch_size
=
hparams
.
synthesis_batch_size
,
num_workers
=
2
,
num_workers
=
2
if
platform
.
system
()
!=
"Windows"
else
0
,
shuffle
=
False
,
pin_memory
=
True
)
...
...
@@ -80,7 +80,7 @@ def run_synthesis(in_dir, out_dir, model_dir, hparams):
if
device
.
type
==
"cuda"
and
torch
.
cuda
.
device_count
()
>
1
:
_
,
mels_out
,
_
=
data_parallel_workaround
(
model
,
texts
,
mels
,
embeds
)
else
:
_
,
mels_out
,
_
=
model
(
texts
,
mels
,
embeds
)
_
,
mels_out
,
_
,
_
=
model
(
texts
,
mels
,
embeds
)
for
j
,
k
in
enumerate
(
idx
):
# Note: outputs mel-spectrogram files and target ones have same names, just different folders
...
...
synthesizer/train.py
浏览文件 @
7432046e
...
...
@@ -15,6 +15,7 @@ import numpy as np
from
pathlib
import
Path
import
sys
import
time
import
platform
def
np_now
(
x
:
torch
.
Tensor
):
return
x
.
detach
().
cpu
().
numpy
()
...
...
@@ -146,7 +147,7 @@ def train(run_id: str, syn_dir: str, models_dir: str, save_every: int,
data_loader
=
DataLoader
(
dataset
,
collate_fn
=
lambda
batch
:
collate_synthesizer
(
batch
,
r
,
hparams
),
batch_size
=
batch_size
,
num_workers
=
2
,
num_workers
=
2
if
platform
.
system
()
!=
"Windows"
else
0
,
shuffle
=
True
,
pin_memory
=
True
)
...
...
vocoder/train.py
浏览文件 @
7432046e
...
...
@@ -11,7 +11,7 @@ import vocoder.hparams as hp
import
numpy
as
np
import
time
import
torch
import
platform
def
train
(
run_id
:
str
,
syn_dir
:
Path
,
voc_dir
:
Path
,
models_dir
:
Path
,
ground_truth
:
bool
,
save_every
:
int
,
backup_every
:
int
,
force_restart
:
bool
):
...
...
@@ -79,7 +79,7 @@ def train(run_id: str, syn_dir: Path, voc_dir: Path, models_dir: Path, ground_tr
data_loader
=
DataLoader
(
dataset
,
collate_fn
=
collate_vocoder
,
batch_size
=
hp
.
voc_batch_size
,
num_workers
=
2
,
num_workers
=
2
if
platform
.
system
()
!=
"Windows"
else
0
,
shuffle
=
True
,
pin_memory
=
True
)
start
=
time
.
time
()
...
...
vocoder_preprocess.py
浏览文件 @
7432046e
...
...
@@ -43,7 +43,7 @@ if __name__ == "__main__":
if
args
.
cpu
:
# Hide GPUs from Pytorch to force CPU processing
os
.
environ
[
"CUDA_VISIBLE_DEVICES"
]
=
""
os
.
environ
[
"CUDA_VISIBLE_DEVICES"
]
=
"
-1
"
# Verify webrtcvad is available
if
not
args
.
no_trim
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录