Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Parakeet
提交
173693f4
P
Parakeet
项目概览
PaddlePaddle
/
Parakeet
通知
8
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Parakeet
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
173693f4
编写于
2月 13, 2020
作者:
C
chenfeiyu
提交者:
liuyibing01
2月 16, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix missing imports, fix ljspeech.yaml config key: encoder_channels
上级
5beef513
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
30 addition
and
33 deletion
+30
-33
examples/deepvoice3/ljspeech.yaml
examples/deepvoice3/ljspeech.yaml
+5
-17
examples/deepvoice3/synthesis.py
examples/deepvoice3/synthesis.py
+12
-6
examples/deepvoice3/train.py
examples/deepvoice3/train.py
+7
-8
parakeet/data/__init__.py
parakeet/data/__init__.py
+4
-0
parakeet/models/deepvoice3/__init__.py
parakeet/models/deepvoice3/__init__.py
+2
-2
未找到文件。
examples/deepvoice3/ljspeech.yaml
浏览文件 @
173693f4
...
...
@@ -21,6 +21,7 @@ transform:
# db scale
min_level_db
:
-100
ref_level_db
:
20
clip_norm
:
true
loss
:
...
...
@@ -48,20 +49,20 @@ model:
embedding_weight_std
:
0.1
freeze_embedding
:
false
padding_idx
:
0
encoder_channels
:
256
encoder_channels
:
512
# decoder
query_position_rate
:
1.0
key_position_rate
:
1.29
trainable_positional_encodings
:
false
kernel_size
:
3
decoder_channels
:
512
decoder_channels
:
256
downsample_factor
:
4
outputs_per_step
:
1
# attention
key_p
osition_rate
:
true
value_p
osition_rate
:
true
key_p
rojection
:
true
value_p
rojection
:
true
force_monotonic_attention
:
true
window_backward
:
-1
window_ahead
:
3
...
...
@@ -88,16 +89,3 @@ train:
snap_interval
:
1000
eval_interval
:
10000
save_interval
:
10000
examples/deepvoice3/synthesis.py
浏览文件 @
173693f4
import
os
import
argparse
import
ruamel.yaml
s
import
ruamel.yaml
import
numpy
as
np
import
soundfile
as
sf
...
...
@@ -22,6 +22,11 @@ if __name__ == "__main__":
parser
.
add_argument
(
"checkpoint"
,
type
=
str
,
help
=
"checkpoint to load."
)
parser
.
add_argument
(
"text"
,
type
=
str
,
help
=
"text file to synthesize"
)
parser
.
add_argument
(
"output_path"
,
type
=
str
,
help
=
"path to save results"
)
parser
.
add_argument
(
"-g"
,
"--device"
,
type
=
int
,
default
=-
1
,
help
=
"device to use"
)
args
=
parser
.
parse_args
()
with
open
(
args
.
config
,
'rt'
)
as
f
:
...
...
@@ -67,7 +72,7 @@ if __name__ == "__main__":
use_memory_mask
=
model_config
[
"use_memory_mask"
]
query_position_rate
=
model_config
[
"query_position_rate"
]
key_position_rate
=
model_config
[
"key_position_rate"
]
window_b
ehind
=
model_config
[
"window_behin
d"
]
window_b
ackward
=
model_config
[
"window_backwar
d"
]
window_ahead
=
model_config
[
"window_ahead"
]
key_projection
=
model_config
[
"key_projection"
]
value_projection
=
model_config
[
"value_projection"
]
...
...
@@ -76,11 +81,12 @@ if __name__ == "__main__":
freeze_embedding
,
filter_size
,
encoder_channels
,
n_mels
,
decoder_channels
,
r
,
trainable_positional_encodings
,
use_memory_mask
,
query_position_rate
,
key_position_rate
,
window_behind
,
window_
ahead
,
key_projection
,
value
_projection
,
downsample_factor
,
linear_dim
,
use_decoder_states
,
converter_channels
,
dropout
)
query_position_rate
,
key_position_rate
,
window_
backward
,
window_ahead
,
key
_projection
,
value_projection
,
downsample_factor
,
linear_dim
,
use_decoder_states
,
converter_channels
,
dropout
)
summary
(
dv3
)
state
,
_
=
dg
.
load_dygraph
(
args
.
checkpoint
)
dv3
.
set_dict
(
state
)
...
...
examples/deepvoice3/train.py
浏览文件 @
173693f4
import
os
import
argparse
import
ruamel.yaml
s
import
ruamel.yaml
import
numpy
as
np
from
matplotlib
import
cm
import
matplotlib.pyplot
as
plt
...
...
@@ -15,10 +15,9 @@ import paddle.fluid.layers as F
import
paddle.fluid.dygraph
as
dg
from
parakeet.g2p
import
en
from
parakeet.models.deepvoice3.encoder
import
ConvSpec
from
parakeet.data
import
FilterDataset
,
TransformDataset
,
FilterDataset
from
parakeet.data
import
DataCargo
,
PartialyRandomizedSimilarTimeLengthSampler
,
SequentialSampler
from
parakeet.models.deepvoice3
import
Encoder
,
Decoder
,
Converter
,
DeepVoice3
from
parakeet.models.deepvoice3
import
Encoder
,
Decoder
,
Converter
,
DeepVoice3
,
ConvSpec
from
parakeet.models.deepvoice3.loss
import
TTSLoss
from
parakeet.utils.layer_tools
import
summary
...
...
@@ -128,7 +127,7 @@ if __name__ == "__main__":
use_memory_mask
=
model_config
[
"use_memory_mask"
]
query_position_rate
=
model_config
[
"query_position_rate"
]
key_position_rate
=
model_config
[
"key_position_rate"
]
window_b
ehind
=
model_config
[
"window_behin
d"
]
window_b
ackward
=
model_config
[
"window_backwar
d"
]
window_ahead
=
model_config
[
"window_ahead"
]
key_projection
=
model_config
[
"key_projection"
]
value_projection
=
model_config
[
"value_projection"
]
...
...
@@ -137,10 +136,10 @@ if __name__ == "__main__":
freeze_embedding
,
filter_size
,
encoder_channels
,
n_mels
,
decoder_channels
,
r
,
trainable_positional_encodings
,
use_memory_mask
,
query_position_rate
,
key_position_rate
,
window_behind
,
window_
ahead
,
key_projection
,
value
_projection
,
downsample_factor
,
linear_dim
,
use_decoder_states
,
converter_channels
,
dropout
)
query_position_rate
,
key_position_rate
,
window_
backward
,
window_ahead
,
key
_projection
,
value_projection
,
downsample_factor
,
linear_dim
,
use_decoder_states
,
converter_channels
,
dropout
)
# =========================loss=========================
loss_config
=
config
[
"loss"
]
...
...
parakeet/data/__init__.py
浏览文件 @
173693f4
from
.dataset
import
*
from
.datacargo
import
*
from
.sampler
import
*
from
.batch
import
*
parakeet/models/deepvoice3/__init__.py
浏览文件 @
173693f4
from
parakeet.models.deepvoice3.encoder
import
Encoder
from
parakeet.models.deepvoice3.decoder
import
Decoder
from
parakeet.models.deepvoice3.encoder
import
Encoder
,
ConvSpec
from
parakeet.models.deepvoice3.decoder
import
Decoder
,
WindowRange
from
parakeet.models.deepvoice3.converter
import
Converter
from
parakeet.models.deepvoice3.model
import
DeepVoice3
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录