Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
DeepSpeech
提交
ffb17a25
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看板
提交
ffb17a25
编写于
6月 08, 2023
作者:
H
Hui Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hotfix english G2P
上级
89d959fc
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
47 addition
and
1 deletion
+47
-1
paddlespeech/t2s/assets/sentences_mix.txt
paddlespeech/t2s/assets/sentences_mix.txt
+2
-1
paddlespeech/t2s/frontend/phonectic.py
paddlespeech/t2s/frontend/phonectic.py
+19
-0
tests/unit/tts/test_mixfrontend.py
tests/unit/tts/test_mixfrontend.py
+13
-0
tests/unit/tts/test_ssml.py
tests/unit/tts/test_ssml.py
+13
-0
未找到文件。
paddlespeech/t2s/assets/sentences_mix.txt
浏览文件 @
ffb17a25
...
...
@@ -6,3 +6,4 @@
006 热烈欢迎您在 Discussions 中提交问题,并在 Issues 中指出发现的 bug。此外,我们非常希望您参与到 Paddle Speech 的开发中!
007 我喜欢 eat apple, 你喜欢 drink milk。
008 我们要去云南 team building, 非常非常 happy.
009 AI for Sceience 平台。
\ No newline at end of file
paddlespeech/t2s/frontend/phonectic.py
浏览文件 @
ffb17a25
...
...
@@ -47,10 +47,29 @@ class Phonetics(ABC):
class
English
(
Phonetics
):
""" Normalize the input text sequence and convert into pronunciation id sequence.
https://github.com/Kyubyong/g2p/blob/master/g2p_en/g2p.py
phonemes = ["<pad>", "<unk>", "<s>", "</s>"] + [
'AA0', 'AA1', 'AA2', 'AE0', 'AE1', 'AE2', 'AH0', 'AH1', 'AH2', 'AO0',
'AO1', 'AO2', 'AW0', 'AW1', 'AW2', 'AY0', 'AY1', 'AY2', 'B', 'CH', 'D', 'DH',
'EH0', 'EH1', 'EH2', 'ER0', 'ER1', 'ER2', 'EY0', 'EY1',
'EY2', 'F', 'G', 'HH',
'IH0', 'IH1', 'IH2', 'IY0', 'IY1', 'IY2', 'JH', 'K', 'L',
'M', 'N', 'NG', 'OW0', 'OW1',
'OW2', 'OY0', 'OY1', 'OY2', 'P', 'R', 'S', 'SH', 'T', 'TH',
'UH0', 'UH1', 'UH2', 'UW',
'UW0', 'UW1', 'UW2', 'V', 'W', 'Y', 'Z', 'ZH']
"""
LEXICON
=
{
# key using lowercase
"AI"
.
lower
():
[[
"EY0"
,
"AY1"
]],
}
def
__init__
(
self
,
phone_vocab_path
=
None
):
self
.
backend
=
G2p
()
self
.
backend
.
cmu
.
update
(
English
.
LEXICON
)
self
.
phonemes
=
list
(
self
.
backend
.
phonemes
)
self
.
punctuations
=
get_punctuations
(
"en"
)
self
.
vocab
=
Vocab
(
self
.
phonemes
+
self
.
punctuations
)
...
...
tests/unit/tts/test_mixfrontend.py
浏览文件 @
ffb17a25
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
re
import
tempfile
...
...
tests/unit/tts/test_ssml.py
浏览文件 @
ffb17a25
# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
paddlespeech.t2s.frontend.ssml.xml_processor
import
MixTextProcessor
if
__name__
==
'__main__'
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录