Truco
2024-10-28 1a45b647a858b72c711c64bfe6b2e5333df6fd86
refs
用户 Truco <22969604+truc0@users.noreply.github.com>
星期一, 十月 28, 2024 13:41 +0800
提交者 GitHub <noreply@github.com>
星期一, 十月 28, 2024 13:41 +0800
提交1a45b647a858b72c711c64bfe6b2e5333df6fd86
目录 68452b4e0d19849c8cbd78ad802e90554da2d7f4 目录 | zip | gz
parent 1254e8aee1e3200acc2b4752c6822bfc1a21b22f 查看 | 对比
perf(models/FsmnVADStreaming): optimize GetFrameState and PopDataToOutputBuf (#2177)

- In GetFrameState(), pass generator to sum() instead of generating a list, ~10% gain in a 21s sample
- In GetFrameState(), cast `sum_score` (a tensor) to float to reduce calling to tensor lib,
~13% gain in a 23s example
- In PopDataToOutputBuf(), remove unused `out_pos` and related calculation, ~10% gain in a 27s sample
1个文件已修改
22 ■■■■ 已修改文件
funasr/models/fsmn_vad_streaming/model.py 22 ●●●● 对比 | 查看 | 原始文档 | blame | 历史