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