• 大小: 1.94MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-10-25
  • 语言: 其他
  • 标签:

资源简介

这是语音信号处理的大作业,共振峰检测的有关资料,希望对大家有用,谢谢

资源截图

代码片段和文件信息

%F1F2F3F4

clear;

[yfsnbits]=wavread(‘F:\语音库\实验语音\dress6.wav‘);

y=filter([1 -0.975][1]y);%预加重,系数等于0.975
all_length=length(y);
figure(100);set(gcf‘Color‘‘White‘);
specgram(y(:1)1024fs4016);
%本实验中采样率为8kHz帧长取256持续时间t=256/8000=31.75ms帧移为1/4帧长
N=256;%帧长
fm=N*1/4; %帧移
franum=floor((length(y)-N+fm)/fm);%计算总帧数
D_lpcc=16; p=13; LSFArray=[zeros(1p)‘];
xl = 0:fs/(2*N-1):fs;
for num=1:franum
    for q=1:N
        h(q)=0.54-0.46*cos(2*pi*q/N);%汉明窗
        x(q)=y((num-1)*fm+q)*h(q);
    end%加窗后的短时信号
    %subplot(211);
    %plot(x);axis([1 256 0 0.045]);
    x_fft = abs(fft(xN)).^2;
    A = lpc(xp);
    A_fft = abs(fft(AN)).^2;
    lpcc=lpc_to_lpcc(Ap);%lpc to lpcc 
    %figure(2);plot(A_fft(1:128)‘.‘);
    [A_fft_decind_a_fft] = sort(A_fft(1:128));%找出极值点
    lsf = poly2lsf(A);
    freq = lsf/2/pi*fs;
    freq_array = [0];
    LSFArray = [LSFArray lsf];
    for k = 1 : p-1
        delta_lsf(k) = lsf(k+1) - lsf(k); %差分线谱对
    end
    [d_lsf_decind_lsf] = sort(delta_lsf);%升序排序后的差分线谱对
    %figure(3);plot(delta_lsf‘.‘);
    % 找出相邻频带
    [ind_lsf_dind_ind_lsf] = sort(ind_lsf(1:8));%对差分线谱对的标号进行排序找出标号所对应的相邻频带
    k = 1;        sum = 1;      index = 1;
    for i = k+1 : 8
        if abs( ind_lsf_d(k) - ind_lsf_d(i) )==sum%相邻频段
           sum = sum + 1;
        else
            if sum > 1 && i == k + sum%在相邻的(一段元素)区域中选择最小差分线谱对
               if sum > 3%对长相邻区域的处理  选取出两个共振峰
                   [minlsfmin_indx] = min(delta_lsf(ind_lsf_d(k:i-1))); 
                   %[maxlsfmax_indx] = max(delta_lsf(ind_lsf_d(k:i-1)));
                   [lsf1ind_lfs1] = sort( delta_lsf(ind_lsf_d(k:i-1)) );
                   for j = 2 : sum
                       if abs(ind_lfs1(j) - ind_lfs1(1)) > 1
                           max_indx = ind_lfs1(j);
                           break;
                       end
                   end
                   freq_array = [freq_array ind_lsf_d(min_indx+k-1)];
                   freq_array = [freq_array ind_lsf_d(max_indx+k-1)];
                   index = index + 2;
                   sum = 1;
                   k = i;
               else       %短相邻区域的处理 选取出一个共振峰
                   [minlsfmin_indx] = min(delta_lsf(ind_lsf_d(k:i-1))); 
                   freq_array = [freq_array ind_lsf_d(min_indx+k-1)];
                   index = index + 1;
                   sum = 1;
                   k = i;
               end
            else
                freq_array = [freq_array ind_lsf_d(k)];
                index = index + 1;
                k = k + 1;
            end
        end
    end
    if sum <= 3
        if k == 8%对数组末尾元素的处理
            freq_array = [freq_array ind_lsf_d(k)];
            index = index + 1;
        else
            [minlsfmin_indx] = min(delta_lsf(ind_lsf_d(k:i))); 
            freq_array = [freq_array ind_lsf_d(min_indx+k-1)];
            index = index + 1;
        end
    else %对长相邻区域的处理
        [minlsfmin_indx

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4947  2008-01-04 15:51  共振峰\21840260lsp\lsp.m

     文件       9194  2007-12-24 14:56  共振峰\39709610formant~\formant~.c

     文件       2797  2009-07-07 15:27  共振峰\39709610formant~.rar

     文件       1141  2009-02-18 12:19  共振峰\5956457lpc\新建文件夹\LPCfrequency.m

     文件      44389  1994-04-16 22:41  共振峰\650375klatt.3.04\klatt.3.04\example1.par

     文件     172430  1994-04-16 22:41  共振峰\650375klatt.3.04\klatt.3.04\example2.par

     文件      18994  1994-04-17 02:00  共振峰\650375klatt.3.04\klatt.3.04\getopt.c

     文件       3950  1994-04-17 00:03  共振峰\650375klatt.3.04\klatt.3.04\getopt.h

     文件       1908  1994-05-08 02:47  共振峰\650375klatt.3.04\klatt.3.04\INSTALL

     文件       8358  1994-05-09 15:51  共振峰\650375klatt.3.04\klatt.3.04\klatt.c

     文件      11436  1994-05-08 02:47  共振峰\650375klatt.3.04\klatt.3.04\klatt.man

     文件        500  1994-05-09 15:59  共振峰\650375klatt.3.04\klatt.3.04\Makefile

     文件      24263  1994-05-09 15:56  共振峰\650375klatt.3.04\klatt.3.04\parwave.c

     文件       6565  1994-04-16 22:41  共振峰\650375klatt.3.04\klatt.3.04\parwave.h

     文件        227  1994-04-16 22:41  共振峰\650375klatt.3.04\klatt.3.04\proto.h

     文件      10806  1994-04-21 17:06  共振峰\650375klatt.3.04\klatt.3.04\README

     文件     312940  2003-05-14 21:28  共振峰\9927426speech_analysis\Feature

     文件       5905  2003-05-14 16:52  共振峰\9927426speech_analysis\Feature.dsp

     文件        539  2003-05-14 16:52  共振峰\9927426speech_analysis\Feature.dsw

     文件     435200  2009-07-06 20:20  共振峰\9927426speech_analysis\Feature.ncb

     文件      59904  2009-07-06 20:20  共振峰\9927426speech_analysis\Feature.opt

     文件       4106  2009-07-06 20:19  共振峰\9927426speech_analysis\Feature.plg

     文件       4984  2003-04-04 13:21  共振峰\9927426speech_analysis\FeatureLib\FeatureLib.dsp

     文件       1446  2003-04-04 12:38  共振峰\9927426speech_analysis\FeatureLib\FeatureLib.plg

     文件       9372  2003-05-15 08:22  共振峰\9927426speech_analysis\FE_basic.cpp

     文件       4935  2003-05-15 08:22  共振峰\9927426speech_analysis\FE_common.h

     文件       8985  2003-05-14 18:23  共振峰\9927426speech_analysis\FE_complex.h

     文件       2337  2003-05-14 16:51  共振峰\9927426speech_analysis\FE_delta.cpp

     文件      21618  2003-05-14 16:51  共振峰\9927426speech_analysis\FE_endpoint.cpp

     文件       4127  2003-05-14 16:51  共振峰\9927426speech_analysis\FE_endpoint.h

............此处省略74个文件信息

评论

共有 条评论

相关资源