-
Notifications
You must be signed in to change notification settings - Fork 1k
add text to pinyin model as tts frontend #3506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Thanks for your contribution! |
|
||
Predict: | ||
batch_size: 1 | ||
input: "欢迎使用飞桨" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里建议使用 txt文件路径,文字放到txt文件中。这样和其他模型保持统一。
Yields: | ||
list: list of file path. | ||
""" | ||
if isinstance(inputs, str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议在现有基础上,额外支持 str 为本地txt文件路径。
assert len(simplified_charcters) == len(simplified_charcters) | ||
|
||
s2t_dict = {} | ||
t2s_dict = {} | ||
for i, item in enumerate(simplified_charcters): | ||
s2t_dict[item] = traditional_characters[i] | ||
t2s_dict[traditional_characters[i]] = item |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这段代码放到tranditional_to_simplified()中吧
opencc | ||
onnxruntime | ||
pypinyin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
按照最新的paddlex第三方依赖规范,这三个包似乎属于【三类特殊依赖】,应该放到setup.py中的EXTRAS中。且最新规范中,requirements.txt已经废弃不再使用。具体请参考:
https://ku.baidu-int.com/knowledge/HFVrC7hq1Q/yKeL8Lljko/YkH5mORwJ3/X1tDrwm1qSK2Zx
from typing import Tuple | ||
|
||
import numpy as np | ||
import onnxruntime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
依据最新的paddlex第三方依赖管理规范,onnxruntime 应该不是默认安装的依赖库,不应在顶层import,并考虑使用function_requires_deps修饰相关调用函数。具体请参考:https://ku.baidu-int.com/knowledge/HFVrC7hq1Q/yKeL8Lljko/YkH5mORwJ3/X1tDrwm1qSK2Zx
"fix_mode": None, | ||
"count_json": "train.count.json", | ||
}, | ||
"lr": 5e-5, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个配置文件是做什么的呢?为什么还有学习率配置
) | ||
elif char in self.char_bopomofo_dict: | ||
partial_result[i] = pypinyin_result[i][0] | ||
# partial_result[i] = self.style_convert_func(self.char_bopomofo_dict[char][0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
调试代码的话就删掉吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个tokenizer的改动也是和这个模型相关的吗?
No description provided.