speech separation matlab code
#1

hello,
m doing mtech project in speech/voice processing domain.For start up i need some basic experiments along with matlab code.pls help me in this regard.
Reply
#2

speech separation matlab code

% NAME
% spSeparationCepstrum - Source-Filter Separation via Cepstrum
% SYNOPSIS
% [source, filter, c, y] =
% spSeparationCepstrum(x, fs, ncoef, window, show)
% DESCRIPTION
% Source-Filter Separation via the Cepstrum.
% This deconvolve speech signal into source (vocal codes, white noise)
% and filter (oral cavity, coloring, envelope) component
% INPUTS
% x (vector) of size Nx1 which contains one frame signal
% fs (scalar) the sampling rate
% [ncoef]
% (scalar) the number of coefficients of cepstrum to treat
% as low-time parts. The default uses
% ncoef = 2 + fs / 1000;
% as a rule of thumb.
% [window]
% (string) the window function such as 'rectwin', 'hamming'.
% The default is 'rectwin' (or no window).
% [show] (boolean) plot or not. The default is 0.
% OUTPUTS
% source (vector) of size Nx1 which containts log magnitude (not dB)
% frequency response of high-time cepstrum parts that is
% source (vocal tract, white noise) component
% filter (vector) of size Nx1 which constains log magnitude (not dB)
% frequency response of low-time cepstrum parts that is
% filter (oral cavity, coloring, envelope) component
% [c] (vector) of size Nx1 which contains cepstrum coefficients
% [y] (vector) of size Nx1 which contains frequency response of input
% AUTHOR
% Naotoshi Seo, April 2008
function [source, filter, c, y] = spSeparationCepstrum(x, fs, ncoef, window, show)
%% initialization
N = length(x);
x = x(Smile;
if ~exist('show', 'var') || isempty(show)
show = 0;
end
if ~exist('window', 'var') || isempty(window)
window = 'rectwin';
end
if ~exist('ncoef', 'var') || isempty(ncoef)
ncoef = 2 + round(fs / 1000);
end

%% get cepstrum
[c, y] = spCepstrum(x, window);

%% get high-time spectrum response
highc = [zeros(ncoef,1); c(ncoef:end)];
source = fft(highc); % recover high-time parts to log mag freq response

%% get low-time spectrum response
lowc = [c(1:ncoef); zeros(length©-ncoef,1)];
filter = fft(lowc); % recover low-time parts to log mag freq response

%% plot
if show
figure;
ms1=fs/1000; % 1ms. maximum speech Fx at 1000Hz
ms20=fs/50; % 20ms. minimum speech Fx at 50Hz

% plot waveform
t=(0:N-1)/fs; % times of sampling instants
subplot(3,2,1);
plot(t,x);
xlabel('Time (s)');
ylabel('Amplitude');
title('(a) Waveform');

% plot log spectrum
f = (0:N/2-1)*fs/N; % rest half is mirror for real signal
db = 20*log(abs(y(1:length(f))));
subplot(3,2,2);
plot(f,db);
title('(b) Spectrum');
xlabel('Frequency (Hz)');
ylabel('Magnitude (dB)');
ylim([-100 100]);

% plot cepstrum between 1ms (=1000Hz) and 20ms (=50Hz)
q=(ms1:ms20)/fs;
subplot(3,2,3);
plot(q,abs(c(ms1:ms20)));
title('© Cepstrum');
xlabel('Quefrency (s)');
ylabel('Amplitude');

% plot low-time spectrum response
subplot(3,2,4);
plot(f,20*real(filter(1:length(f))));
title('(d) Low-time Spectrum (Filter)');
xlabel('Frequency (Hz)');
ylabel('Magnitude (dB)');
ylim([-100 100]);

% plot high-time spectrum response
subplot(3,2,6);
plot(f,20*real(source(1:length(f))));
title('(e) High-time Spectrum (Source)');
xlabel('Frequency (Hz)');
ylabel('Magnitude (dB)');
ylim([-100 100]);
end
end
function spSeparationCepstrumDemo
x1 = wgn(1000, 1, 1); fs = 16000;
c = spSeparationCepstrum(x1, fs, 20, 'hamming', 'plot');

[x2, fs] = wavread('bee.wav'); x2 = x2(1001:2000);
c = spSeparationCepstrum(x2, fs, 20, 'hamming', 'plot');

x3 = awgn(x2,50);
c = spSeparationCepstrum(x3, fs, 20, 'hamming', 'plot');
end
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: zedgraph scatter plot, voice and speech separation code in scilab or matlab, how to plot a, fingerprint separation matlab coding pdf, matlab code for histogram separation, plot for salethan,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  how to calculate distance in heed protocol by using matlab 1 1,887 15-06-2018, 03:54 PM
Last Post: Guest
  matlab code for incremental conductance mppt 1 1,426 02-05-2018, 02:28 PM
Last Post: eksi
  anomaly detection code in matlab 3 2,094 23-04-2018, 12:04 AM
Last Post: Guest
  matlab code for liver tumor segmentation 2 1,585 01-04-2018, 06:29 PM
Last Post: [email protected]
  matlab code for vehicle tracking using unscented kalman filter 3 16,890 26-03-2018, 08:57 PM
Last Post: fodayj
  matlab code for facial expression recognition using frequency domain 1 2,683 19-02-2018, 06:03 PM
Last Post: Guest
  matlab code shadow detection and removal in colour images using matlab 2 2,262 12-01-2018, 01:24 PM
Last Post: dhanabhagya
  simulink matlab model upqc mdl 3 6,777 18-12-2017, 09:08 AM
Last Post: jaseela123d
  matlab code for speed breaker detection 1 1,296 27-10-2017, 10:22 AM
Last Post: Guest
  skin cancer detection using neural networks matlab code 13 3,895 23-10-2017, 02:52 PM
Last Post: Guest

Forum Jump: