Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
11bc3926
D
DeepSpeech
项目概览
PaddlePaddle
/
DeepSpeech
大约 2 年 前同步成功
通知
210
Star
8425
Fork
1598
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
245
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DeepSpeech
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
245
Issue
245
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
11bc3926
编写于
2月 24, 2023
作者:
H
HuangLiangJie
提交者:
GitHub
2月 24, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TTS]Canton phonetic fix, test=tts (#2950)
上级
c8d5a01b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
15 deletion
+25
-15
examples/canton/tts3/README.md
examples/canton/tts3/README.md
+1
-1
examples/canton/tts3/local/synthesize_e2e.sh
examples/canton/tts3/local/synthesize_e2e.sh
+2
-2
examples/other/mfa/local/generate_canton_lexicon_wavlabs.py
examples/other/mfa/local/generate_canton_lexicon_wavlabs.py
+9
-7
paddlespeech/t2s/exps/sentences_canton.txt
paddlespeech/t2s/exps/sentences_canton.txt
+2
-1
paddlespeech/t2s/frontend/canton_frontend.py
paddlespeech/t2s/frontend/canton_frontend.py
+11
-4
未找到文件。
examples/canton/tts3/README.md
浏览文件 @
11bc3926
...
...
@@ -116,6 +116,6 @@ python3 ${BIN_DIR}/../synthesize_e2e.py \
--output_dir
=
exp/default/test_e2e
\
--phones_dict
=
fastspeech2_canton_ckpt_1.4.0/phone_id_map.txt
\
--speaker_dict
=
fastspeech2_canton_ckpt_1.4.0/speaker_id_map.txt
\
--spk_id
=
0
\
--spk_id
=
1
0
\
--inference_dir
=
exp/default/inference
```
examples/canton/tts3/local/synthesize_e2e.sh
浏览文件 @
11bc3926
...
...
@@ -25,7 +25,7 @@ if [ ${stage} -le 0 ] && [ ${stop_stage} -ge 0 ]; then
--output_dir
=
${
train_output_path
}
/test_e2e
\
--phones_dict
=
dump/phone_id_map.txt
\
--speaker_dict
=
dump/speaker_id_map.txt
\
--spk_id
=
0
\
--spk_id
=
1
0
\
--inference_dir
=
${
train_output_path
}
/inference
fi
...
...
@@ -48,6 +48,6 @@ if [ ${stage} -le 1 ] && [ ${stop_stage} -ge 1 ]; then
--output_dir
=
${
train_output_path
}
/test_e2e
\
--phones_dict
=
dump/phone_id_map.txt
\
--speaker_dict
=
dump/speaker_id_map.txt
\
--spk_id
=
0
\
--spk_id
=
1
0
\
--inference_dir
=
${
train_output_path
}
/inference
fi
examples/other/mfa/local/generate_canton_lexicon_wavlabs.py
浏览文件 @
11bc3926
...
...
@@ -15,16 +15,18 @@ def check(str):
return
False
consonants
=
[
'p'
,
'b'
,
't'
,
'd'
,
'ts'
,
'dz'
,
'k'
,
'g'
,
'kw'
,
'gw'
,
'f'
,
'h'
,
'l'
,
'm'
,
'ng'
,
'n'
,
's'
,
'y'
,
'w'
,
'c'
,
'z'
,
'j'
INITIALS
=
[
'aa'
,
'aai'
,
'aak'
,
'aap'
,
'aat'
,
'aau'
,
'ai'
,
'au'
,
'ap'
,
'at'
,
'ak'
,
'a'
,
'p'
,
'b'
,
'e'
,
'ts'
,
't'
,
'dz'
,
'd'
,
'kw'
,
'k'
,
'gw'
,
'g'
,
'f'
,
'h'
,
'l'
,
'm'
,
'ng'
,
'n'
,
's'
,
'y'
,
'w'
,
'c'
,
'z'
,
'j'
,
'ong'
,
'on'
,
'ou'
,
'oi'
,
'ok'
,
'o'
,
'uk'
,
'ung'
]
def
get_lines
(
canton
):
for
consonant
in
consonants
:
if
canton
.
startswith
(
consonan
t
):
c
,
v
=
canton
[:
len
(
consonant
)],
canton
[
len
(
consonan
t
):]
for
init
in
INITIALS
:
if
canton
.
startswith
(
ini
t
):
c
,
v
=
canton
[:
len
(
init
)],
canton
[
len
(
ini
t
):]
return
canton
+
' '
+
c
+
' '
+
v
return
canton
+
' '
+
canton
...
...
@@ -73,7 +75,7 @@ if __name__ == "__main__":
canton_list
=
canton_list
.
split
(
' '
)
all_canton
.
extend
(
canton_list
)
all_canton
=
s
et
(
all_canton
)
all_canton
=
s
orted
(
list
(
set
(
all_canton
))
)
with
open
(
args
.
output_lexicon
,
'w'
)
as
f
:
for
canton
in
all_canton
:
...
...
paddlespeech/t2s/exps/sentences_canton.txt
浏览文件 @
11bc3926
...
...
@@ -17,4 +17,5 @@
017 佢晨早啪奶茶,同场追加奶绿,又狂怼西米露,喫啫啫猪脚煲
018 喂!三点几嚟,饮茶先啦,做咁多都冇用嘅,老细唔锡你嘅嚟
019 嗱嗱声即刻走去搵嘢做,人必须知道自己嘅用途
020 人人都揸住枝苏格兰场非工业用国际线路自动溶雪16哇佬风油軚垂直升降镭射彩色洗衣干衣气垫毛笔一枝
\ No newline at end of file
020 人人都揸住枝苏格兰场非工业用国际线路自动溶雪16哇佬风油軚垂直升降镭射彩色洗衣干衣气垫毛笔一枝
021 各个国家有各个国家嘅国歌
\ No newline at end of file
paddlespeech/t2s/frontend/canton_frontend.py
浏览文件 @
11bc3926
...
...
@@ -21,8 +21,10 @@ import ToJyutping
from
paddlespeech.t2s.frontend.zh_normalization.text_normlization
import
TextNormalizer
INITIALS
=
[
'p'
,
'b'
,
't'
,
'd'
,
'ts'
,
'dz'
,
'k'
,
'g'
,
'kw'
,
'gw'
,
'f'
,
'h'
,
'l'
,
'm'
,
'ng'
,
'n'
,
's'
,
'y'
,
'w'
,
'c'
,
'z'
,
'j'
'aa'
,
'aai'
,
'aak'
,
'aap'
,
'aat'
,
'aau'
,
'ai'
,
'au'
,
'ap'
,
'at'
,
'ak'
,
'a'
,
'p'
,
'b'
,
'e'
,
'ts'
,
't'
,
'dz'
,
'd'
,
'kw'
,
'k'
,
'gw'
,
'g'
,
'f'
,
'h'
,
'l'
,
'm'
,
'ng'
,
'n'
,
's'
,
'y'
,
'w'
,
'c'
,
'z'
,
'j'
,
'ong'
,
'on'
,
'ou'
,
'oi'
,
'ok'
,
'o'
,
'uk'
,
'ung'
]
INITIALS
+=
[
'sp'
,
'spl'
,
'spn'
,
'sil'
]
...
...
@@ -32,8 +34,13 @@ def get_lines(cantons: List[str]):
for
canton
in
cantons
:
for
consonant
in
INITIALS
:
if
canton
.
startswith
(
consonant
):
c
,
v
=
canton
[:
len
(
consonant
)],
canton
[
len
(
consonant
):]
phones
=
phones
+
[
c
,
v
]
if
canton
.
startswith
(
"nga"
):
c
,
v
=
canton
[:
len
(
consonant
)],
canton
[
len
(
consonant
):]
phones
=
phones
+
[
canton
[
2
:]]
else
:
c
,
v
=
canton
[:
len
(
consonant
)],
canton
[
len
(
consonant
):]
phones
=
phones
+
[
c
,
v
]
break
return
phones
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录