Speech Slytherin: Examining the Performance and Efficiency of Mamba for Speech Separation, Recognition, and Synthesis

Xilin Jiang,Yinghao Aaron Li,Adrian Nicolas Florea,Cong Han,Nima Mesgarani
2024-07-13
Abstract:It is too early to conclude that Mamba is a better alternative to transformers for speech before comparing Mamba with transformers in terms of both performance and efficiency in multiple speech-related tasks. To reach this conclusion, we propose and evaluate three models for three tasks: Mamba-TasNet for speech separation, ConMamba for speech recognition, and VALL-M for speech synthesis. We compare them with transformers of similar sizes in performance, memory, and speed. Our Mamba or Mamba-transformer hybrid models show comparable or higher performance than their transformer counterparts: Sepformer, Conformer, and VALL-E. They are more efficient than transformers in memory and speed for speech longer than a threshold duration, inversely related to the resolution of a speech token. Mamba for separation is the most efficient, and Mamba for recognition is the least. Further, we show that Mamba is not more efficient than transformer for speech shorter than the threshold duration and performs worse in models that require joint modeling of text and speech, such as cross or masked attention of two inputs. Therefore, we argue that the superiority of Mamba or transformer depends on particular problems and models. Code available at <a class="link-external link-https" href="https://github.com/xi-j/Mamba-TasNet" rel="external noopener nofollow">this https URL</a> and <a class="link-external link-https" href="https://github.com/xi-j/Mamba-ASR" rel="external noopener nofollow">this https URL</a>.
Audio and Speech Processing,Machine Learning,Sound
What problem does this paper attempt to address?
This paper mainly explores the performance and efficiency comparison between the Mamba model and the Transformer model in speech separation, recognition, and synthesis tasks. The study proposes Mamba-TasNet for speech separation, ConMamba for speech recognition, and V ALL-M for speech synthesis, and compares them with Transformer models of equivalent size. Experimental results show that the Mamba model performs comparably or better than the Transformer model in certain aspects, especially in terms of memory and speed when dealing with long speech sequences. However, for shorter speech and tasks that require joint modeling of text and speech, Mamba's efficiency is not superior to Transformer. Specifically, bidirectional Mamba performs similarly or better than Self-Attention in speech separation and recognition tasks, while unidirectional Mamba performs slightly worse in these tasks. Mamba's performance is slightly worse in ASR decoders and the language model of V ALL-E. In addition, the study found that Mamba is more efficient in speech beyond a certain threshold length, which is related to the resolution of speech tokens. Mamba has a greater advantage in high-resolution tasks such as separation, but little or no advantage in low-resolution tasks such as recognition. In conclusion, the paper concludes that whether Mamba is superior to Transformer depends on specific problems and models. The authors hope that these observations will promote consideration of more suitable scenarios for Mamba in speech applications, leading to more efficient and optimized model designs.