paddlespeech.s2t.decoders.utils 模块

paddlespeech.s2t.decoders.utils.add_results_to_json(js, nbest_hyps, char_list)[来源]

将N个最佳结果添加到json中。

Args:

js (dict[str, Any]): 真实话语字典。
nbest_hyps_sd (list[dict[str, Any]]):

多说话者的假设列表:nutts x nspkrs。

char_list (list[str]): 字符列表。

Returns:

dict[str, Any]: N-best结果添加的发言字典。

paddlespeech.s2t.decoders.utils.end_detect(ended_hyps, i, M=3, D_end=-10.0)[来源]

结束检测。

在 S. Watanabe 等人的文章中描述,如方程 (50) "端到端语音识别的混合 CTC/注意力架构"

Parameters:
  • ended_hyps -- 字典

  • i -- 整数

  • M -- 整型

  • D_end -- 浮点数

Returns:

布尔值

paddlespeech.s2t.decoders.utils.parse_hypothesis(hyp, char_list)[来源]

解析假设。

Args:

hyp (list[dict[str, Any]]): 识别假设。
char_list (list[str]): 字符列表。

Returns:

元组(str, str, str, float)