- 1、本文档共11页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
语音信号处理课程考核报告题目1:绘制同一段语音的宽带语谱图和窄带语谱图题目2:基于倒谱图判断浊音的基音周期学号:201212235135 姓名:黄子文班级:电信DB1204班2015年5月20日题目一:绘制同一段语音的宽带语谱图和窄带语谱图实验原理和部分代码首先是声音的录入和播放,我用的是wavrecord和wavplay。两个函数的基本功能如下: (1)wavrecord y=wavrecord(n,Fs) records n samples of audio signal,sampled at a rate of Fs Hz(samples per second). The default value for Fs is 11025Hz Fs为采样频率,一般默认为11025Hz。n为采样点数,一般是Fs的t倍,其中t为采样的时长。 (2)wavplaywavplay(y,Fs)plays the audo signal stored in the vector y on a PC-based audio output device. Fs is the integer sample rate in Hz(samples per second). The default value for Fs is 11025Hz.这个函数就是可以播放刚录入的音频信号,在这里我主要是检测一下录入是否成功。以下是录音和放音的程序:fs=16000; %è??ù?μ?êduration=2; %??ò?ê±??fprintf(Press any key to start %g seconds of recording...\n,duration);pause;fprintf(Recording...\n);y=wavrecord(duration*fs,fs); %duration*fs ê?×üμ?2é?ùμ?êyfprintf(Finished recording.\n);fprintf(Press any key to play the recording...\n);pause;wavplay(y,fs);将这个程序保存为record01.m绘制这段语音的宽带语谱图和窄带语谱图。这里,我定义了一个函数specgram_ex3p19(x, winlgh, frmlgh, sampling_rate),这个函数的代码和注释如下:function [spec] = specgram_ex3p19(x, winlgh, frmlgh, sampling_rate); % specgram_hw3p20(x, winlgh, frmlgh, sampling_rate)%% function to compute a spectrogram %% x = input waveform % winlgh = window length in samples% frmlgh = frame length in samples% sampling_rate = samples/sec% PARAMETERS%sampling_rate = 10000;% sampling ratelfft = 1024; % FFT lengthlfft2 = lfft/2;%winlgh = 200; % (128) window length (in samples)%frmlgh = 10; % frame interval (in samples)noverlap = winlgh - frmlgh;% x = x(1:4500); x = 2.0*x/max(abs(x));etime = length(x)/sampling_rate;%---------------------------------------------------------------------------%spec = abs(specgram(x, lfft, sampling_rate, winlgh, noverlap));subplot(211);plot((1:length(x))/sampling_rate,x)xlabel(Time (s));title(SPEECH);axis([0 etime -2.5 2.5]);grid;subplot(212)imagesc(0:.010:etime, 0:1000:(sampling_rate/2), log10(abs(spec)));axis(xy)xlabel(Time (ms)),
文档评论(0)