亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? specsub.m

?? voice box tool box for matlab
?? M
字號:
function [ss,zo]=specsub(si,fsz,pp)
%SPECSUB performs speech enhancement using spectral subtraction [SS,ZO]=(S,FSZ,P)
%
% Inputs:
%   si      input speech signal
%   fsz     sample frequency in Hz
%           Alternatively, the input state from a previous call (see below)
%   pp      algorithm parameters [optional]
%
% Outputs:
%   ss      output enhanced speech (length is rounded down to the nearest frame boundary)
%   zo      output state
%
% The algorithm operation is controlled by a small number of parameters:
%
%        pp.of          % overlap factor = (fft length)/(frame increment) [2]
%        pp.ti          % desired frame increment [0.016 seconds]
%        pp.ri          % set to 1 to round ti to the nearest power of 2 samples [0]
%        pp.g           % subtraction domain: 1=magnitude, 2=power [1]
%        pp.e           % gain exponent [1]
%        pp.am          % max oversubtraction factor [3]
%        pp.b           % max noise attenutaion in power domain [0.01]
%        pp.al          % SNR for oversubtraction=am (set this to Inf for fixed a) [-5 dB]
%        pp.ah          % SNR for oversubtraction=1 [20 dB]
%
% Following [1], the gain in each time-frequency bin is given by
%                          min(1,max(1-(a*N/X)^(g/2),(b*N/X)^(g/2)))^(e/g)
% where N and X are the powers of the noise and noisy speech respectively.
% The oversubtraction factor varies linearly between a=am for a frame SNR of al down to
% a=1 for a frame SNR of ah. To obtain a fixed value of a for all values of SNR, set al=Inf.
% Common exponent combinations are:
%                      g=1  e=1    Magnitude Domain spectral subtraction
%                      g=2  e=1    Power Domain spectral subtraction
%                      g=2  e=0.5  Wiener filtering
%
% In addition it is possible to specify parameters for the noise estimation algorithm
% which implements reference [2] from which equation numbers are given in parentheses.
% They are as follows:
%
%        pp.taca      % (11): smoothing time constant for alpha_c [0.0449 seconds]
%        pp.tamax     % (3): max smoothing time constant [0.392 seconds]
%        pp.taminh    % (3): min smoothing time constant (upper limit) [0.0133 seconds]
%        pp.tpfall    % (12): time constant for P to fall [0.064 seconds]
%        pp.tbmax     % (20): max smoothing time constant [0.0717 seconds]
%        pp.qeqmin    % (23): minimum value of Qeq [2]
%        pp.qeqmax    % max value of Qeq per frame [14]
%        pp.av        % (23)+13 lines: fudge factor for bc calculation  [2.12]
%        pp.td        % time to take minimum over [1.536 seconds]
%        pp.nu        % number of subwindows to use [3]
%        pp.qith      % Q-inverse thresholds to select maximum noise slope [0.03 0.05 0.06 Inf ]
%        pp.nsmdb     % corresponding noise slope thresholds in dB/second   [47 31.4 15.7 4.1]
%
%
% If convenient, you can call specsub in chunks of arbitrary size. Thus the following are equivalent:
%
%                   (a) y=specsub(s,fs);
%
%                   (b) [y1,z]=specsub(s(1:1000),fs);
%                       [y2,z]=specsub(s(1001:2000),z);
%                       y3=specsub(s(2001:end),z);
%                       y=[y1; y2; y3];
%
% Note that the number of output samples will be less than the number of input samples if
% the input length is not an exact number of frames. In addition, if two output arguments
% are specified, the last partial frame samples will be retained for overlap adding
% with the output from the next call to specsub().
%
% Refs:
%    [1] M. Berouti, R. Schwartz and J. Makhoul
%        Enhancement of speech corrupted by acoustic noise
%        Proc IEEE ICASSP, 1979, 4, 208-211
%    [2] Rainer Martin.
%        Noise power spectral density estimation based on optimal smoothing and minimum statistics.
%        IEEE Trans. Speech and Audio Processing, 9(5):504-512, July 2001.

%      Copyright (C) Mike Brookes 2004
%      Version: $Id: specsub.m,v 1.2 2009/02/27 07:46:15 dmb Exp $
%
%   VOICEBOX is a MATLAB toolbox for speech processing.
%   Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   This program is free software; you can redistribute it and/or modify
%   it under the terms of the GNU General Public 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 PARTICULAR PURPOSE.  See the
%   GNU General Public License for more details.
%
%   You can obtain a copy of the GNU General Public License from
%   http://www.gnu.org/copyleft/gpl.html or by writing to
%   Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if isstruct(fsz)
    fs=fsz.fs;
    qq=fsz.qq;
    qp=fsz.qp;
    ze=fsz.ze;
    s=zeros(length(fsz.si)+length(si(:)),1); % allocate space for speech
    s(1:length(fsz.si))=fsz.si;
    s(length(fsz.si)+1:end)=si(:);
else
    fs=fsz;     % sample frequency
    s=si(:);
    % default algorithm constants

    qq.of=2;   % overlap factor = (fft length)/(frame increment)
    qq.ti=16e-3;   % desired frame increment (16 ms)
    qq.ri=0;       % round ni to the nearest power of 2
    qq.g=1;        % subtraction domain: 1=magnitude, 2=power
    qq.e=1;        % gain exponent
    qq.am=3;      % max oversubtraction factor
    qq.b=0.01;      % noise floor
    qq.al=-5;       % SNR for maximum a (set to Inf for fixed a)
    qq.ah=20;       % SNR for minimum a
    if nargin>=3 && ~isempty(pp)
        qp=pp;      % save for estnoisem call
        qqn=fieldnames(qq);
        for i=1:length(qqn)
            if isfield(pp,qqn{i})
                qq.(qqn{i})=pp.(qqn{i});
            end
        end
    else
        qp=struct;  % make an empty structure
    end
end
% derived algorithm constants
if qq.ri
    ni=pow2(nextpow2(qq.ti*fs*sqrt(0.5)));
else
    ni=round(qq.ti*fs);    % frame increment in samples
end
tinc=ni/fs;          % true frame increment time

% calculate power spectrum in frames

no=round(qq.of);                                   % integer overlap factor
nf=ni*no;           % fft length
w=sqrt(hamming(nf+1))'; w(end)=[]; % for now always use sqrt hamming window
w=w/sqrt(sum(w(1:ni:nf).^2));       % normalize to give overall gain of 1
y=enframe(s,w,ni);
yf=rfft(y,nf,2);
yp=yf.*conj(yf);        % power spectrum of input speech
[nr,nf2]=size(yp);              % number of frames
if isstruct(fsz)
    [dp,ze]=estnoisem(yp,ze);   % estimate the noise using minimum statistics
    ssv=fsz.ssv;
else
    [dp,ze]=estnoisem(yp,tinc,qp);   % estimate the noise using minimum statistics
    ssv=zeros(ni*(no-1),1);             % dummy saved overlap
end
if ~nr                                  % no data frames
    ss=[];
else

    mz=yp==0;   %  mask for zero power time-frequency bins (unlikely)
    if qq.al<Inf
        ypf=sum(yp,2);
        dpf=sum(dp,2);
        mzf=dpf==0;     % zero noise frames = very high SNR
        af=1+(qq.am-1)*(min(max(10*log10(ypf./(dpf+mzf)),qq.al),qq.ah)-qq.ah)/(qq.al-qq.ah);
        af(mzf)=1;      % fix the zero noise frames
    else
        af=repmat(qq.am,nr,1);
    end
    switch qq.g
        case 1
            v=sqrt(dp./(yp+mz));
            af=sqrt(af);
            bf=sqrt(qq.b);
        case 2
            v=dp./(yp+mz);
            bf=qq.b;
        otherwise
            v=(dp./(yp+mz)).^(0.5*qq.g);
            af=af.^(0.5*qq.g);
            bf=qq.b^(0.5*qq.g);
    end
    af =repmat(af,1,nf2);
    mf=v>=(af+bf).^(-1);      % mask for noise floor limiting
    g=zeros(size(v));
    eg=qq.e/qq.g;
    switch eg
        case 1
            g(mf)=min(bf*v(mf),1);    % never give a gain > 1
            g(~mf)=1-af(~mf).*v(~mf);
        case 0.5
            g(mf)=sqrt(min(bf*v(mf),1));
            g(~mf)=sqrt(1-af(~mf).*v(~mf));
        otherwise
            g(mf)=(min(bf*v(mf),1)).^eg;
            g(~mf)=(1-af(~mf).*v(~mf)).^eg;
    end
    se=(irfft((yf.*g).',nf).').*repmat(w,nr,1);   % inverse dft and apply output window
    ss=zeros(ni*(nr+no-1),no);                      % space for overlapped output speech
    ss(1:ni*(no-1),end)=ssv;
    for i=1:no
        nm=nf*(1+floor((nr-i)/no));  % number of samples in this set
        ss(1+(i-1)*ni:nm+(i-1)*ni,i)=reshape(se(i:no:nr,:)',nm,1);
    end
    ss=sum(ss,2);

end
if nargout>1
    if nr
        zo.ssv=ss(end-ni*(no-1)+1:end);    % save the output tail for next time
        ss(end-ni*(no-1)+1:end)=[];
    else
        zo.ssv=ssv;  %
    end
    zo.si=s(length(ss)+1:end);      % save the tail end of the input speech signal
    zo.fs=fs;                       % save sample frequency
    zo.qq=qq;                       % save loval parameters
    zo.qp=qp;                       % save estnoisem parameters
    zo.ze=ze;                       % save state of noise estimation
end
if ~nargout && nr>0
    ttax=(1:nr)*tinc;
    ffax=(0:size(g,2)-1)*fs/nf/1000;    ax=zeros(4,1);
    ax(1)=subplot(223);
    imagesc(ttax,ffax,20*log10(g)');
    colorbar;
    axis('xy');
    if qq.al==Inf
        title(sprintf('Filter Gain (dB): a=%.2g, b=%.3g',qq.am,qq.b));
    else
        title(sprintf('Filter Gain (dB): a=%.2g (%.0f to %.0fdB), b=%.3g',qq.am,qq.al,qq.ah,qq.b));
    end
    xlabel('Time (s)');
    ylabel('Frequency (kHz)');

    ax(2)=subplot(222);
    imagesc(ttax,ffax,10*log10(yp)');
    colorbar;
    axis('xy');
    title('Noisy Speech (dB)');
    xlabel('Time (s)');
    ylabel('Frequency (kHz)');

    ax(3)=subplot(224);
    imagesc(ttax,ffax,10*log10(yp.*g.^2)');
    colorbar;
    axis('xy');
    title(sprintf('Enhanced Speech (dB): g=%.2g, e=%.3g',qq.g,qq.e));
    xlabel('Time (s)');
    ylabel('Frequency (kHz)');

    ax(4)=subplot(221);
    imagesc(ttax,ffax,10*log10(dp)');
    colorbar;
    axis('xy');
    title('Noise Estimate (dB)');
    xlabel('Time (s)');
    ylabel('Frequency (kHz)');
    linkaxes(ax);
end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩成人免费在线| av在线不卡网| av一本久道久久综合久久鬼色| 欧美久久一区二区| 国产午夜三级一区二区三| 日韩精品一二三区| 99久久精品国产毛片| 久久九九久久九九| 日产国产高清一区二区三区| 91丨国产丨九色丨pron| 国产午夜三级一区二区三| 日日骚欧美日韩| 欧美手机在线视频| 亚洲女人****多毛耸耸8| 奇米精品一区二区三区在线观看一| 99久久777色| 国产精品全国免费观看高清| 精品国产3级a| kk眼镜猥琐国模调教系列一区二区| 日韩成人午夜精品| 欧美精品一区二区三区很污很色的| 亚洲精品国产第一综合99久久 | 丝袜脚交一区二区| 成人天堂资源www在线| 日韩欧美久久一区| 天堂精品中文字幕在线| 欧美性色综合网| 亚洲欧洲精品成人久久奇米网| 国产福利电影一区二区三区| 日韩欧美电影一二三| 亚洲丰满少妇videoshd| 色哟哟一区二区三区| 亚洲免费大片在线观看| 色综合久久六月婷婷中文字幕| 国产色产综合色产在线视频| 国产一区二区在线影院| 久久久91精品国产一区二区三区| 国产一区二区三区黄视频 | 99精品视频一区二区| 国产精品人妖ts系列视频| 国产一区日韩二区欧美三区| 久久久久久电影| av在线一区二区三区| 中文字幕一区不卡| 91免费视频大全| 亚洲综合图片区| 欧美高清视频不卡网| 蜜臀99久久精品久久久久久软件| 欧美大片日本大片免费观看| 国产精品99久久久久久久vr| 亚洲国产精品精华液ab| 99免费精品在线观看| 亚洲最色的网站| 91精品国产综合久久久久久 | 一区二区三区四区乱视频| 欧美亚洲日本一区| 久久精品99国产精品日本| 久久精品视频一区二区| av电影一区二区| 亚洲线精品一区二区三区| 91精品国产综合久久久久久漫画 | 亚洲品质自拍视频| 欧美电影一区二区| 国产传媒日韩欧美成人| 亚洲私人影院在线观看| 56国语精品自产拍在线观看| 国产在线精品国自产拍免费| 亚洲日本韩国一区| 777欧美精品| www.日韩av| 秋霞午夜av一区二区三区| 国产亚洲1区2区3区| 欧美日韩亚州综合| 国产一区二区三区精品欧美日韩一区二区三区 | 91成人在线免费观看| 美国三级日本三级久久99| 国产欧美视频一区二区三区| 欧美在线三级电影| 粉嫩久久99精品久久久久久夜 | 欧美日韩综合色| 国产成人综合自拍| 日本三级亚洲精品| 亚洲欧洲国产日韩| wwww国产精品欧美| 欧美日韩一区二区三区不卡| 成人av资源站| 国产一区欧美日韩| 日韩极品在线观看| 一区二区三区四区中文字幕| 国产亚洲欧美日韩日本| 91超碰这里只有精品国产| 99精品热视频| 国产成都精品91一区二区三| 蜜桃视频在线一区| 亚洲午夜激情网页| 亚洲女性喷水在线观看一区| 久久久久国色av免费看影院| 欧美一级在线视频| 精品1区2区3区| 91影院在线观看| 风间由美一区二区av101| 久久国产免费看| 青青草国产成人av片免费| 亚洲综合成人在线| 亚洲免费观看在线观看| 中文字幕日韩av资源站| 国产欧美一区二区精品性色 | 欧美一级午夜免费电影| 欧美一级专区免费大片| 欧美三级视频在线| 欧美性videosxxxxx| 91色综合久久久久婷婷| av成人动漫在线观看| eeuss鲁片一区二区三区| 大桥未久av一区二区三区中文| 国产在线一区二区| 国产在线精品视频| 国产精品一区三区| 成人中文字幕电影| 99国产精品久久久久久久久久| 波多野洁衣一区| 91视频免费看| av电影天堂一区二区在线| 一本一道久久a久久精品综合蜜臀 一本一道综合狠狠老 | 成人免费毛片片v| 成人黄页在线观看| 91麻豆国产在线观看| 欧美视频日韩视频在线观看| 在线视频观看一区| 777亚洲妇女| 2020国产精品久久精品美国| 国产亚洲欧美中文| 中文字幕亚洲不卡| 香蕉加勒比综合久久| 久久99精品国产麻豆不卡| 国产精品99久久久久久有的能看| k8久久久一区二区三区| 欧美在线一二三| 日韩免费高清电影| 国产人成亚洲第一网站在线播放| 国产精品嫩草影院av蜜臀| 亚洲主播在线观看| 捆绑变态av一区二区三区| 国产91精品在线观看| 一本到不卡精品视频在线观看| 91精品啪在线观看国产60岁| 久久久777精品电影网影网| 亚洲摸摸操操av| 美女www一区二区| 一本色道亚洲精品aⅴ| 欧美成人a视频| 亚洲免费观看高清完整版在线观看| 日韩激情在线观看| 97成人超碰视| 精品国产制服丝袜高跟| 亚洲摸摸操操av| 国产制服丝袜一区| 91福利国产精品| 久久久久国产精品人| 性做久久久久久久久| 国产黄色91视频| 在线不卡一区二区| 国产精品国产精品国产专区不蜜| 午夜a成v人精品| 成人美女视频在线观看18| 欧美一区二区精美| 亚洲精品国产视频| 国产精品1024| 日韩一区二区视频| 一区二区日韩电影| 成人av网站免费| 精品国精品国产| 日韩电影在线免费| 色屁屁一区二区| 国产精品欧美极品| 国产乱码精品一区二区三区av | 99视频在线观看一区三区| 亚洲精品在线观看视频| 亚洲成人动漫在线观看| 99精品欧美一区二区蜜桃免费| 久久久久久日产精品| 日本欧美一区二区三区| 欧美天天综合网| 亚洲男人天堂av网| 成人av手机在线观看| 国产三级精品在线| 激情综合色丁香一区二区| 日本大香伊一区二区三区| 欧美国产一区二区| 国产精品77777| 久久午夜免费电影| 国产一区91精品张津瑜| 欧美不卡激情三级在线观看| 免费在线观看不卡| 91精品免费在线| 免费xxxx性欧美18vr| 日韩欧美中文字幕精品| 日韩二区三区在线观看| 91精品国产一区二区三区蜜臀| 丝袜美腿亚洲色图|