




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、实验一语音信号端点检测一、实验目的.学会MATLAB勺使用,掌握 MATLAB勺程序设计方法;.掌握语音处理的基本概念、基本理论和基本方法;.掌握基于 MATLA编程实现带噪语音信号端点检测;.学会用MATLAB寸信号进行分析和处理。.学会利用短时过零率和短时能量,对语音信号的端点进行检测。二、实验仪器设备及软件HP D538、MATLAB三、实验原理端点检测是语音信号处理过程中非常重要的一步,它的准确性直接影响到语音信号处理的速度和结果。本次实验利用短时过零率和短时能量相结合的语音端点检测算法利用短时过零率来检测清音,用短时能量来检测浊音,两者相配合便实现了信号信噪比较大情况下的端 点检测。
2、算法对于输入信号的检测过程可分为短时能量检测和短时过零率检测两个部分。算法以短时能量检测为主,短时过零率检测为辅。根据语音的统计特性,可以把语音段分为清音、 浊音以及静音(包括背景噪声)三种。在本算法中,短时能量检测可以较好地区分出浊音和静音。对于清音,由于其能量较小,在短时能量检测中会因为低于能量门限而被误判为静音; 短时过零率则可以从语音中区分出静音和清音。将两种检测结合起来,就可以检测出语音段(清音和浊音)及静音段1、短时能量计算定义n时刻某语言信号的短时平均能量En为:二n2 2En = x(m)w(n -m) = x(m)w(n -m)二二m-(N)式中N为窗长,可见短时平均能量为一
3、帧样点值的平方和。特殊地,当窗函数为n矩形窗时,有En = x2 (m)m hN J)2、短时过零率过零就是指信号通过零值。过零率就是每秒内信号值通过零值的次数。对于离散时间序列,过零则是指序列取样值改变符号,过零率则是每个样本的改变符号的次数。对于语音信号,则是指在一帧语音中语音信号波形穿过横轴(零电平)的次数。可以用相邻两个取样改变符号的次数来计算。如果窗的起点是n=0,短时过零率Z为波形穿过横轴(零电平)的次数N JZ0 二一% |Sgn(Sw(n)-Sgn(Sw(n-1)|n卫1 x0 sgn(x) =.I*。短时过零可以看作信号频率的简单度量浊音的短时平均幅度最大,无声的短时平均幅度
4、最小,清音的短时过零率最大,无 声居中,浊音的短时过零率最小。3、短时自相关函数N -k JRw(k) =sw(n)sw(n k)n =0是偶函数;s(n)是周期的,那么 R (k)也是周期的;可用于基音周期估计和线性预测分析4、判断语音信号的起点和终点利用短时平均幅度和短时过零率可以判断语音信号的起点和终点。语音端点检测方法可采用测试信号的短时能量或短时对数能量、联合过零率等特征参数,并采用双门限判定法来检测语音端点,即利用过零率检测清音,用短时能量检测浊音,两者配合。首先为短时能量 和过零率分别确定两个门限,一个是较低的门限数值较小,对信号的变化比较敏感, 很容易超过;另一个是比较高的门限
5、,数值较大。低门限被超过未必是语音的开始,有可能是很短的噪声引起的,高门限被超过并且接下来的自定义时间段内的语音。四、实验步骤及程序(1)实验步骤:1、取一段录音作为音频样本。2、利用公式分别编程计算这段语音信号的短时能量和短时过零率,然后分别画出它们的曲线。3、调整能量门限。4、进行幅度归一化并设置帧长、短时能量阈值、过零率阈值等参数。5、编写程序实现语音端点检测。6、最后得到语音端点检测图像。(2)语音信号的端点检测程序流程图:图1.1语音信号的端点检测程序流程图(3)语音信号的端点检测实验源程序:clc;clear;x,fs=wavread( 2.wav);%y = end_point(
6、x);% f0 = pitch_sift(x,0.38,fs);% plot(f0);,fs);%e_x=(frame(x, lpc_spectrum某一维随时间变化一帧信号各维之间变化%plot(e_x(2,:);% plot(e_x(:,89);% hold on;c=melcepst(x,fs);plot(c(89,:),k);frame 定义% function y = frame(x,func,SAMP_FREQ,l,step)% where y is output on a frame by frame basis, x is input speech,% and l is the
7、 window size. l and step are optional parameters,% by default SAMP_FREQ is 8000, l is 200, and step is 100.% func is a string e.g. pitch that determines a function that you want% to apply to x on a short-time basis.% Written by: Levent ArslanApr. 11, 1994function yy = frame(x,func,SAMP_FREQ,l,step)m
8、,n=size(x);if mn n=m;elsen=n; x=x;endif nargin 3, SAMP_FREQ=16000;end ;if nargin 4, l=SAMP_FREQ/40;end ;if nargin 5, step=l/2;end ;num_frames=ceil(n/step);%NUMBER OF FRAMESx(n+1:n+2*l)=zeros(2*l,1);%ADD ZEROS AT THE END OF THE SPEECH SIGNALi=0:step:num_frames*step;%i is the arithmetical proportion s
9、eries bystep j=i*ones(1,l);i=j+ones(num_frames+1,1)*1:l;y=reshape(x(i),num_frames+1,l);y=(hanning(l)*ones(1,num_frames+1).*y;for i=1:num_frames cmd=sprintf(yy(:,i)=%s(y(:,i);,func);eval(cmd);endmelcepst 定义function c=melcepst(s,fs,w,nc,p,n,inc,fl,fh)%MELCEPST Calculate the mel cepstrum of a signalC=(
10、S,FS,W,NC,P,N,INC,FL,FH)% Simple use: c=melcepst(s,fs) % calculate mel cepstrum with 12 coefs,256 sample frames%c=melcepst(s,fs,e0dD) % include log energy, 0thcepstral coef, delta and delta-delta coefs% Inputs:% s speech signal% fs sample rate in Hz (default 11025)% nc number of cepstral coefficient
11、s excluding 0th coefficient(default 12)% n length of frame (default power of 2 30 ms)% p number of filters in filterbank (default floor(3*log(fs)% inc frame increment (default n/2)% fl low end of the lowest filter as a fraction of fs (default = 0)% fh high end of highest filter as a fraction of fs (
12、default = 0.5)% w any sensible combination of the following:%R rectangular window in time domain%N Hanning window in time domain%M Hamming window in time domain (default)%t triangular shaped filters in mel domain (default)%n hanning shaped filters in mel domain%m hamming shaped filters in mel domain
13、%p filters act in the power domain%afilters act in the absolute magnitude domain (default)%0 include 0th order cepstral coefficient%e include log energy%d include delta coefficients (dc/dt)%D include delta-delta coefficients (dA2c/dtA2)%z highestand lowest filters taper down to zero (default)%y lowe
14、st filter remains at 1 down to 0 frequency and%highest filter remains at 1 up to nyquist freqency% If tyor ny is specified, the total power in the fft ispreserved.% Outputs: c mel cepstrum output: one frame per row% Copyright (C) Mike Brookes 1997% Last modified Thu Jun 15 09:14:48 2000% VOICEBOX is
15、 a MATLAB toolbox for speech processing. Home page is at% HYPERLINK http:/www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html http:/www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html%, % This program is free software; you can redistributeit and/or modify% it under the terms of the GNU General Publi
16、c License as published by% the Free Software Foundation; either version 2 of the License, or% (at your option) any later version.% This program is distributed in the hope that it will be useful,% but WITHOUT ANY WARRANTY; without even the implied warranty of% MERCHANTABILITY or FITNESS FOR A PARTICU
17、LAR PURPOSE. See the% GNU General Public License for more details.% You can obtain a copy of the GNU General Public License from% HYPERLINK /pub/gnu/COPYING-2.0 /pub/gnu/COPYING-2.0 or by writing to% Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.%, %if nargin2 fs=11025;endif
18、nargin3 w= M ; endif nargin4 nc=12;endif nargin5 p=floor(3*log(fs);endif nargin6 n=pow2(floor(log2(0.03*fs);endif nargin9fh=0.5;if nargin8fl=0;if narginnc c(:,nc+1:end)=;elseif pnc c=c zeros(nf,nc-p);endif any(w= 0) c(:,1)=口;endif any(w= e) c=log(sum(pw). c;end% calculate derivativeif any(w= D) vf=(4:-1:-4)/60;af=(1:-1:-1)/2;ww=ones(5,1);cx=c(ww,:); c; c(nf*ww,:);vx=reshape(filter(vf,1,cx
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025-2030年中国塞规项目投资可行性研究分析报告
- 3000借款合同范本
- 设计epc合同范本
- 女装时尚设计与产品创新趋势
- 零碳数据算力中心经济效益分析
- 平流式撇渣刮泥机行业市场发展及发展趋势与投资战略研究报告
- 供热管网升级改造方案
- 12MWh储能电站项目概述
- 苏州集装箱项目申请报告范文模板
- 2025年代理商贸行业深度研究分析报告-20241226-171614
- 中国古代服饰文化135张课件
- 《道德与法治》五下第一单元《我们一家人》教案
- 拔罐技术操作流程图
- 真空泵日常操作标准作业指导书
- 钢筋保护层厚度试验检测记录表
- 南宁市海绵城市规划设计导则-图文课件
- 阶段1 古代中华文明的起源与奠基-先秦 课时1 先秦时期的社会经济 课件-2022届高三历史一轮复习
- 电焊工安全教育培训课件
- 公共关系理论与实务ppt课件(完整版)
- 外研版五年级下册小学英语全册教学课件PPT
- 中国石油大学(华东)-朱超-答辩通用PPT模板
评论
0/150
提交评论