基于SPEEX的嵌入式語(yǔ)音錄播系統(tǒng)的設(shè)計(jì)及應(yīng)用研究
發(fā)布時(shí)間:2018-04-22 16:38
本文選題:Speex + 嵌入式系統(tǒng); 參考:《哈爾濱工程大學(xué)》2012年碩士論文
【摘要】:嵌入式系統(tǒng)面世以來(lái)就得到了迅速的發(fā)展,語(yǔ)音的應(yīng)用在嵌入式系統(tǒng)也是常見(jiàn)的,由于嵌入式系統(tǒng)的存儲(chǔ)空間的有限,嵌入式系統(tǒng)中語(yǔ)音軟件層的編碼壓縮已成為必然趨勢(shì)。 Speex是一款基于碼激勵(lì)線性預(yù)測(cè)算法(CELP)的開(kāi)源語(yǔ)音編解碼算法,由于它具有編碼質(zhì)量高、語(yǔ)音速率低、可變比特率、回聲消除、語(yǔ)音分段傳輸?shù)葍?yōu)點(diǎn),因此非常適合作為語(yǔ)音編解碼算法。以往的設(shè)計(jì)都是將Speex應(yīng)用于PC機(jī)上的語(yǔ)音處理,如網(wǎng)絡(luò)語(yǔ)音傳輸?shù)鹊,以減小所需的傳輸帶寬,本文將Speex成功應(yīng)用于嵌入式系統(tǒng)中,并且充分利用了其語(yǔ)音編碼壓縮這一特點(diǎn),成功的解決了嵌入式系統(tǒng)中語(yǔ)音錄制后占用內(nèi)存空間過(guò)大這一問(wèn)題。 本文詳細(xì)的分析了Speex的編解碼原理,并通過(guò)仿真研究得出它非常適合作為嵌入式語(yǔ)音編碼的算法。本課題的設(shè)計(jì)是在ARM平臺(tái)下的語(yǔ)音編解碼系統(tǒng)的設(shè)計(jì)?傮w分為語(yǔ)音采集模塊、語(yǔ)音播放模塊、語(yǔ)音數(shù)據(jù)存儲(chǔ)模塊和USB通信模塊四大核心模塊。本系統(tǒng)選用了意法半導(dǎo)體公司生產(chǎn)的STM32F103作為主控芯片,它具有極大的性價(jià)比。語(yǔ)音采集模塊和語(yǔ)音播放模塊充分利用了speex在語(yǔ)音編解碼方面的強(qiáng)大功能,它們利用了STM32F103上集成的AD和PWM兩個(gè)功能模塊,實(shí)現(xiàn)了語(yǔ)音數(shù)據(jù)的最大化存儲(chǔ)和最真實(shí)還原解碼,其過(guò)程采用兩個(gè)160字節(jié)大小的緩沖區(qū),編碼過(guò)程中一個(gè)緩沖區(qū)用來(lái)裝載ADC讀取的采樣值,,另一個(gè)緩沖區(qū)用來(lái)編碼已經(jīng)存儲(chǔ)的采樣值;解碼過(guò)程中一個(gè)緩沖區(qū)用來(lái)裝載PWM占空比來(lái)播放語(yǔ)音數(shù)據(jù),另一個(gè)緩沖區(qū)用于解碼已存儲(chǔ)的語(yǔ)音數(shù)據(jù)。語(yǔ)音數(shù)據(jù)存儲(chǔ)模塊是通過(guò)片外擴(kuò)展Flash存儲(chǔ)器:M25P16,來(lái)存儲(chǔ)已編碼的語(yǔ)音數(shù)據(jù),它通過(guò)SPI總線與STM32F103通信。USB通信模塊實(shí)現(xiàn)了本系統(tǒng)與PC機(jī)的通信,使M25P16上的語(yǔ)音文件得以上傳到PC機(jī),進(jìn)行下一步的處理。本文還在M25P16中搭建了FAT12文件系統(tǒng),使存儲(chǔ)在M25P16中的語(yǔ)音數(shù)據(jù)以文件的形式上傳到PC機(jī)中,可以在Windows系統(tǒng)中直接讀取語(yǔ)音數(shù)據(jù),而不需要再以二進(jìn)制的形式從M25P16中的扇區(qū)讀取。最后本文從系統(tǒng)性能優(yōu)化的角度,詳細(xì)的介紹了系統(tǒng)軟件優(yōu)化的方法和例子,本文的軟件優(yōu)化從軟件算法的優(yōu)化、程序結(jié)構(gòu)的優(yōu)化、數(shù)據(jù)結(jié)構(gòu)層的優(yōu)化、編譯器的優(yōu)化、Speex算法的優(yōu)化等方面入手,對(duì)系統(tǒng)軟件進(jìn)行以使系統(tǒng)軟件運(yùn)行速度更快,占用空間更小。
[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.
【學(xué)位授予單位】:哈爾濱工程大學(xué)
【學(xué)位級(jí)別】:碩士
【學(xué)位授予年份】:2012
【分類(lèi)號(hào)】:TN912.3;TP368.1
【參考文獻(xiàn)】
相關(guān)期刊論文 前2條
1 蔡鐵;龍志軍;伍星;;基于語(yǔ)音質(zhì)量預(yù)測(cè)的Speex自適應(yīng)碼率控制算法[J];計(jì)算機(jī)應(yīng)用;2010年03期
2 鐘結(jié)實(shí);張科;;Speex語(yǔ)音編解碼的研究及實(shí)現(xiàn)[J];計(jì)算機(jī)測(cè)量與控制;2010年08期
相關(guān)碩士學(xué)位論文 前3條
1 胡鍇亮;電子導(dǎo)游系統(tǒng)中寬帶語(yǔ)音編解碼器SPEEX優(yōu)化研究[D];浙江大學(xué);2008年
2 胡愛(ài)榮;Speex語(yǔ)音編解碼算法及其在DSP上的實(shí)現(xiàn)[D];北京郵電大學(xué);2008年
3 楊淑文;基于Speex技術(shù)的無(wú)線語(yǔ)音編/解碼和傳輸系統(tǒng)設(shè)計(jì)[D];哈爾濱工業(yè)大學(xué);2009年
本文編號(hào):1788039
本文鏈接:http://sikaile.net/kejilunwen/jisuanjikexuelunwen/1788039.html
最近更新
教材專(zhuān)著