Efficient Streaming LLM for Speech Recognition

Junteng Jia,Gil Keren,Wei Zhou,Egor Lakomkin,Xiaohui Zhang,Chunyang Wu,Frank Seide,Jay Mahadeokar,Ozlem Kalinli
2024-10-02
Abstract:Recent works have shown that prompting large language models with audio encodings can unlock speech recognition capabilities. However, existing techniques do not scale efficiently, especially while handling long form streaming audio inputs -- not only do they extrapolate poorly beyond the audio length seen during training, but they are also computationally inefficient due to the quadratic cost of attention. In this work, we introduce SpeechLLM-XL, a linear scaling decoder-only model for streaming speech recognition. We process audios in configurable chunks using limited attention window for reduced computation, and the text tokens for each audio chunk are generated auto-regressively until an EOS is predicted. During training, the transcript is segmented into chunks, using a CTC forced alignment estimated from encoder output. SpeechLLM-XL with 1.28 seconds chunk size achieves 2.7%/6.7% WER on LibriSpeech test clean/other, and it shows no quality degradation on long form utterances 10x longer than the training utterances.
Sound,Artificial Intelligence,Computation and Language,Audio and Speech Processing
What problem does this paper attempt to address?
The main issues that this paper attempts to address with existing large language models (SpeechLLMs) when handling long audio inputs are: 1. **Limited length extrapolation capability**: Existing SpeechLLMs show a significant drop in performance when dealing with inputs longer than the maximum audio length encountered during training. This is because these models tend to terminate decoding prematurely when generating transcription text, especially when faced with audio inputs longer than those in the training data. 2. **Low computational efficiency**: The computational cost of the attention mechanism increases quadratically with the length of the audio, leading to high computational overhead when processing long audio inputs. 3. **Latency issues**: Existing non-streaming SpeechLLMs require the entire audio to be received before generating the transcription text, resulting in high perceived latency for users when handling long audio, particularly when deployed in production systems where low latency is a critical requirement. To address these issues, the paper proposes SpeechLLM-XL, a linearly scalable streaming speech recognition model. By segmenting the audio into fixed-length chunks and processing each chunk with a limited attention window, SpeechLLM-XL can effectively handle long audio inputs while maintaining low computational cost and latency. Specifically, the model improves in the following aspects: - **Audio chunking**: The input audio is divided into fixed-length chunks, with each chunk capable of generating a variable number of text tokens. - **Limited attention window**: When processing each audio chunk, the model only focuses on the current chunk and a few preceding chunks, thereby reducing computational overhead. - **Autoregressive generation**: The text tokens for each audio chunk are generated in an autoregressive manner until an end-of-sequence (EOS) token is predicted. Experimental results show that SpeechLLM-XL performs excellently in handling long audio inputs, achieving efficient streaming speech recognition without sacrificing accuracy.