brindex.m

来自「这是一个用于语音信号处理的工具箱」· M 代码 · 共 39 行

M
39
字号
%
% This function computes the Breathy index and the index as a function of time
% Written by Hector Corazzini
% Modified by Minkyu Lee
% date : 24-March-1995
%
% Usage : [Br, vBr]= brindex(sig, Ts)
%
% Input 
%	sig : speech signal to be analyzed
%       Ts  : the sampling period of the input speech (=1/Fs)
% Output
%	Br  : Breathy index
%	vBr : Breathy index as a function of time

function [Br, vBr]= brindex(sig, Ts)

% The index will be estimated every 10 msec and window length is 20 msec
window=(1/Ts)*2/100;
overlap=(1/Ts)*1/100;

% Preemphasis of +6 dB
sig=diff(sig);
len=length(sig);
if window > len
	window=len-1;
end
if overlap < 1
	overlap=1;
end
k=0;
for n=window:overlap:len
	w=sig(n+1-window:n);
	noise=diff(diff(w));
	k=k+1;
	vBr(k)=(noise'*noise)/(w'*w)*100;
end
Br=mean(vBr);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?