-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[server] add streaming am infer #1713
Conversation
self.voc_block = voc_block | ||
self.voc_pad = voc_pad | ||
|
||
def get_model_info(self, step, model_name, ckpt, stat): |
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.
此处是否也加上 typehint?
step: str, model_name: str, ckpt: Path/str, 等
"""get model information | ||
|
||
Args: | ||
step (string): am or voc |
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.
string -> str, python 不用 string
stat (string): stat file, including mean and standard deviation | ||
|
||
Returns: | ||
model, model_mu, model_std |
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.
返回值
Returns:
Tensor: xxx
np.array : xxx
np.array : xxx
但是其实调用函数可能也不需要写这么多 docstring, 模型代码里面一般要写得清楚一点
|
||
return model, model_mu, model_std | ||
|
||
def _get_pretrained_path(self, tag: str) -> os.PathLike: |
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.
TTSExecutor 里面有这个函数了,是否可以不用写了
突然发现 TTSExecutor 里面这个函数也不用写,因为基类都写了..
@@ -116,11 +473,18 @@ def __init__(self, name=None): | |||
super(TTSEngine, self).__init__() |
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.
我们基类直接用这个 super().init()
|
||
if block_size == -1: | ||
return [data] | ||
|
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.
我这在区分 am 和 voc 的时候是用 filed, 如果保持一致,用户在看源码的时候可能会更容易理解变量的含义
def get_predictor(args, filed='am'): |
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.
LGTM
PR types
New features
PR changes
add streaming am infer
Describe
add streaming am infer