arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2412.11272cs.SDeess.AS
收藏

WhisperFlow: 实时语音基础模型

WhisperFlow: speech foundation models in real time

University of Virginia(弗吉尼亚大学)

Rongxiang Wang, Zhiming Xu, Felix Xiaozhu Lin

AI总结:

WhisperFlow通过静音词、波束剪枝和CPU/GPU流水线优化,实现语音基础模型的高效实时流式处理,显著降低延迟并保持准确率。

摘要:

语音基础模型,如OpenAI的Whisper,因其强大的准确性和泛化能力而成为语音理解领域的最先进技术。然而,它们的应用大多局限于处理预先录制的语音,而流式语音的处理,特别是高效处理,仍然处于初级阶段。这种低效背后有多个根本原因:(1)语音基础模型被训练用于处理长且固定长度的语音输入(通常为30秒);(2)编码每个语音输入需要编码多达1500个令牌,并经过数十个Transformer层;(3)解码每个输出涉及不规则且复杂的波束搜索。因此,在资源受限的客户端设备上进行流式语音处理比其他AI任务(如文本生成)成本更高。为此,我们提出了一个新颖的框架WhisperFlow,它融合了模型和系统优化。(1)静音词(Hush word)作为一个短的、可学习的音频片段;将其附加到语音输入上,静音词可以优雅地阻止语音模型处理更多输入而不产生幻觉;(2)波束剪枝(Beam pruning),它随时间对齐流式音频缓冲区,并重用早期解码轮次的结果,从而显著加速解码;(3)CPU/GPU流水线,不仅动态映射到编码/解码阶段,而且调整到最优资源比例,以适应不同语音输入、模型和硬件之间变化的编码/解码速度。我们在具有4-12个CPU核心和10-30个GPU核心的商用ARM平台上测试了WhisperFlow。它将每词延迟降低了1.6倍至4.7倍,最低可达0.5秒,同时准确率下降可忽略不计。在入门级MacBook Air上,WhisperFlow可以将每词延迟保持在1秒左右,整个设备总功耗仅为7瓦。

英文摘要:

Speech foundation models, such as OpenAI's Whisper, become the state of the art in speech understanding due to their strong accuracy and generalizability. Yet, their applications are mostly limited to processing pre-recorded speech, whereas processing of streaming speech, in particular doing it efficiently, remains rudimentary. Behind this inefficiency are multiple fundamental reasons: (1) speech foundation models are trained to process long, fixed-length voice inputs (often 30 seconds); (2) encoding each voice input requires encoding as many as 1,500 tokens with tens of transformer layers; (3) decoding each output entails an irregular, complex beam search. As such, streaming speech processing on resource-constrained client devices is more expensive than other AI tasks, e.g., text generation. To this end, we present a novel framework, WhisperFlow, which embodies both model and system optimizations. (1) Hush word as a short, learnable audio segment; appended to a voice input, a hush word gracefully stops the speech model from processing more input without hallucination; (2) Beam pruning, which aligns streaming audio buffers over time and reuses results from earlier decoding rounds, therefore significantly accelerating decoding; and (3) CPU/GPU pipelining, which not only maps to the encoding/decoding stages dynamically, but also tunes to an optimal resource ratio, respecting the encoding/decoding speed that varies across voice inputs, models, and hardware. We test WhisperFlow on commodity ARM platforms with 4-12 CPU cores and 10-30 GPU cores. It reduces per-word latency by 1.6x-4.7x to as low as 0.5 second, while seeing negligible accuracy degradation. On an entry-level MacBook Air, WhisperFlow can keep the per-word latency around 1 second, with the whole device drawing only 7 Watts in total.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑