function [signal,fs] = get_timit_signal(fs,path)


if nargin < 1
    fs = 16000;
end

if nargin < 2
    path = '/u/drspeech/data/timit/train/';
    d = dir(path);
    d = d(3:end);
    r = ceil(rand*length(d));
    path = [path,d(r).name,'/'];
    d = dir(path);
    d = d(3:end);
    r = ceil(rand*length(d));
    path = [path,d(r).name,'/'];
    d = dir(path);
    a = zeros(1,length(d));
    for i = 1:length(d),
        if ~isempty(strfind(d(i).name,'.wav'))
            a(i) = 1;
        else
            a(i) = 0;
        end
    end
    d = d(a==1);
    r = ceil(rand*length(d));
    path = [path,d(r).name];
end

signal = loadsphere(path);
signal = signal(:);%delete pap

if fs~=16000
    signal = resample(signal,fs,16000);
end

