[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speech shaped noise

Hi Richard,

The problem with Bernhard's routine is that it **assumes** to know the
speech spectrum. It is easy to write Matlab code that generates a speech
spectrum noise using the canned fftfilt script. If it is placed in an
overlap-add loop, you can generate a speech noise file of arbitrary length
(minutes, if you so wish) by filtering a white noise vector (or file) with
the spectrum of any speech sample of virtually any length.


Here it is:

At 10:54 AM 2/20/2005, Bernhard Seeber wrote:
Hi Richard,

here is a matlab-program to make CCITT-speech shaped, but not
speech-modulated noise from white noise. A sample of Fastl noise
(noise-like in long term spectrum and temporal envelope) can be
downloaded from:


Date:    Sat, 19 Feb 2005 21:30:59 -0000
From:    "Richard H." <auditory@xxxxxxxxxxxxxx>
Subject: Speech shaped noise .WAV or other sample?


I am trying to test some modern digital hearing aids ... but they keep
(sensibly) identifying my puretones as feedback or noise, and
my broadband noise as junk too.

I really need to use speech flavoured noise to prevent the anti-feedback
and anti-noise algorithms from activating.

So ... does anyone know where I can find a 30-second or longer chunk of
speech-shaped noise to do my testing?


Richard (UK)

Dr.-Ing. Bernhard U. Seeber
Department of Psychology
University of California, Berkeley
3210 Tolman Hall #1650
Berkeley, CA 94720-1650, USA
ph.: +1 510-643-8408
fax: +1 510-642-5293

function y = ccitt_filter(sig) % function y = ccitt_filter(sig) % % CCITT (ITU) standard G.227 defines a 'conventional % telephone signal' which equals the long-term spectrum % of speech. The standard defines a filter to simulate % the speech spectrum which is applied to the input signal % sig. % % sig Input signal sig at 44100 Hz sampling rate % y CCITT filtered signal sig % % Bernhard Seeber, 2005

fs = 44100;

%Generate filter coefficients
%in S/Omega-plane
%num_paper = [11638, 54050, 91238, 67280, 18400];
%denom_paper = [1, 130, 4001, 36040, 400];

%make inverted freq-response and shift to 0dB @ 600Hz
%num_coeff = ((2*pi*1000).^(-[4:-1:0])).*denom_paper;
%denom_coeff = ((2*pi*1000).^(-[4:-1:0])).*num_paper;

%for comparison, converted to Omega
%num_coeff = [7.46722e-12, 2.17899e-7, 2.311086e-3, 10.7079, 18400];
%denom_coeff = [6.41624e-16, 5.24087e-10, 1.01347e-4, 5.7359, 400];

%scale coefficients
%num_coeff = num_coeff / denom_coeff(1) * 10^(3.25/20);
%denom_coeff = denom_coeff / denom_coeff(1);

%freqs(num_coeff, denom_coeff);

%convert to z-plane
%[num_z, denom_z] = bilinear(num_coeff, denom_coeff, fs);

%freqz(num_z, denom_z, 1024, fs);

num_z =
[0.00396790391508   0.00032556793042  -0.00314367152058  -0.00104604251859
denom_z =
[1.00000000000000  -3.39268359295324   4.31295903323020  -2.43473845585969

y = filter(num_z, denom_z, sig);