基于SPEEX的嵌入式语音录播系统的设计及应用研究
发布时间:2018-04-22 16:38
本文选题:Speex + 嵌入式系统 ; 参考:《哈尔滨工程大学》2012年硕士论文
【摘要】:嵌入式系统面世以来就得到了迅速的发展,语音的应用在嵌入式系统也是常见的,由于嵌入式系统的存储空间的有限,嵌入式系统中语音软件层的编码压缩已成为必然趋势。 Speex是一款基于码激励线性预测算法(CELP)的开源语音编解码算法,由于它具有编码质量高、语音速率低、可变比特率、回声消除、语音分段传输等优点,因此非常适合作为语音编解码算法。以往的设计都是将Speex应用于PC机上的语音处理,如网络语音传输等等,以减小所需的传输带宽,本文将Speex成功应用于嵌入式系统中,并且充分利用了其语音编码压缩这一特点,成功的解决了嵌入式系统中语音录制后占用内存空间过大这一问题。 本文详细的分析了Speex的编解码原理,并通过仿真研究得出它非常适合作为嵌入式语音编码的算法。本课题的设计是在ARM平台下的语音编解码系统的设计。总体分为语音采集模块、语音播放模块、语音数据存储模块和USB通信模块四大核心模块。本系统选用了意法半导体公司生产的STM32F103作为主控芯片,它具有极大的性价比。语音采集模块和语音播放模块充分利用了speex在语音编解码方面的强大功能,它们利用了STM32F103上集成的AD和PWM两个功能模块,实现了语音数据的最大化存储和最真实还原解码,其过程采用两个160字节大小的缓冲区,编码过程中一个缓冲区用来装载ADC读取的采样值,,另一个缓冲区用来编码已经存储的采样值;解码过程中一个缓冲区用来装载PWM占空比来播放语音数据,另一个缓冲区用于解码已存储的语音数据。语音数据存储模块是通过片外扩展Flash存储器:M25P16,来存储已编码的语音数据,它通过SPI总线与STM32F103通信。USB通信模块实现了本系统与PC机的通信,使M25P16上的语音文件得以上传到PC机,进行下一步的处理。本文还在M25P16中搭建了FAT12文件系统,使存储在M25P16中的语音数据以文件的形式上传到PC机中,可以在Windows系统中直接读取语音数据,而不需要再以二进制的形式从M25P16中的扇区读取。最后本文从系统性能优化的角度,详细的介绍了系统软件优化的方法和例子,本文的软件优化从软件算法的优化、程序结构的优化、数据结构层的优化、编译器的优化、Speex算法的优化等方面入手,对系统软件进行以使系统软件运行速度更快,占用空间更小。
[Abstract]:The embedded system has been developed rapidly since its inception, and the application of speech in embedded system is also common. Because of the limited storage space of embedded system, the coding and compression of speech software layer in embedded system has become an inevitable trend. Speex is an open source speech coding and decoding algorithm based on code excited linear prediction algorithm (CELP). It has the advantages of high coding quality, low speech rate, variable bit rate, echo cancellation, speech segment transmission, etc. Therefore, it is very suitable for speech coding and decoding algorithm. In the past, Speex was applied to PC speech processing, such as network voice transmission, so as to reduce the required transmission bandwidth. In this paper, Speex is successfully applied to embedded system, and the characteristics of speech coding compression are fully utilized. It successfully solves the problem that the memory space is too large after voice recording in embedded system. This paper analyzes the encoding and decoding principle of Speex in detail, and finds that it is very suitable for embedded speech coding algorithm through simulation research. The design of this subject is the design of speech codec system based on ARM platform. It is divided into four core modules: voice acquisition module, voice playing module, voice data storage module and USB communication module. In this system, the STM32F103 produced by Italy Semiconductor Company is selected as the main control chip, which has a great performance and price ratio. The speech acquisition module and the speech playback module make full use of the powerful function of speex in speech coding and decoding. They make use of the AD and PWM function modules integrated on STM32F103 to realize the maximum storage of speech data and the most true restore decoding. Two 160-byte buffers are used in the process of encoding, one buffer is used to load the sampled values read by ADC, the other buffer is used to encode the stored sample values. During decoding, one buffer is used to load the PWM duty cycle to play the voice data, the other buffer is used to decode the stored speech data. The voice data storage module stores encoded voice data by extending Flash memory: M25P16 out of chip. It communicates with STM32F103 through SPI bus. STM32F103 communication module realizes the communication between the system and PC, which enables the voice files on M25P16 to be uploaded to PC. Take the next step. In this paper, the FAT12 file system is also built in M25P16, so that the voice data stored in M25P16 can be uploaded to PC in the form of files, so that the voice data can be read directly in the Windows system without the need to read from sectors in M25P16 in binary form. Finally, from the point of view of system performance optimization, this paper introduces the methods and examples of system software optimization in detail. The software optimization in this paper includes the optimization of software algorithm, the optimization of program structure, the optimization of data structure layer. In order to make the system software run faster and occupy less space, the compiler optimizes the Speex algorithm and so on.
【学位授予单位】:哈尔滨工程大学
【学位级别】:硕士
【学位授予年份】:2012
【分类号】:TN912.3;TP368.1
【参考文献】
相关期刊论文 前2条
1 蔡铁;龙志军;伍星;;基于语音质量预测的Speex自适应码率控制算法[J];计算机应用;2010年03期
2 钟结实;张科;;Speex语音编解码的研究及实现[J];计算机测量与控制;2010年08期
相关硕士学位论文 前3条
1 胡锴亮;电子导游系统中宽带语音编解码器SPEEX优化研究[D];浙江大学;2008年
2 胡爱荣;Speex语音编解码算法及其在DSP上的实现[D];北京邮电大学;2008年
3 杨淑文;基于Speex技术的无线语音编/解码和传输系统设计[D];哈尔滨工业大学;2009年
本文编号:1788039
本文链接:https://www.wllwen.com/kejilunwen/jisuanjikexuelunwen/1788039.html