Welcome to the world of Scilab Speech
function list--Pre-processing
1£®wavreadblock
2£®enhancewienerad
3£®enframe
4£®windowing
1£®wavreadblock
¡¡¡¡----split speech signal into lots of small blocks and read the ith block of the speech signal.
Calling Sequence:
wavreadblock(wavefile, i)
wavreadblock(wavefile, i, blocksize)
Parameters:
¡¡¡¡wavefile: wave file. Vector or matrix.
¡¡¡¡i: the ith block of the speech signal. Integer.
¡¡¡¡blocksize: the size of each block. The default value is 100000.
Description:
The speech signal file stores in Scilab in the form of matrix. Hundreds of thousands of samples are needed to play a 1-second file. That means much more bytes are needed. And usually a speech signal file is much longer than 1s.
The stack size of Scilab is limited. Although we can expand it, it depends on the hardware settings. Once we want to deal with the minutes-file(usually tens Mb), if we read in the file in a time, the first problem is that the stack of Scilab can't afford so big a file, second is the time needed is so large that computer will easily die down.
As the reasons above and according to the principle of paging and section in OS. Before the processing, we just read in the speech signal file block by block and then deal with them, write them out.Thus no matther how large the file is, it won't be limited by the stack size of Scilab.
Examples:
wavreadblock( 'd:\test.wav', 10);
wavreadblock( 'd:\test.wav', 10, 10000);
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡back to top
2£®enhancewienerad
¡¡¡¡----a filter function that using the viener filter.
Calling Sequence:
¡¡¡¡enhancewienerad(srcfile, noisfile)
Parameters:
srcfile: the speech signal file that you want to depress the noise.
noisfile: the file which is filled with noise.
Description:
This function use the viener filter to depress the noise of a speech signal.
Examples:
enhancewienerad('d:\sample.wav', 'd:\noise.wav');
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡back to top
3£®enframe
¡¡¡¡----split a speech signal up into frames. Calling Sequence:
¡¡¡¡enframe(wavefile, win);
¡¡¡¡enframe(wavefile, win, inc);
Parameters:
¡¡¡¡wavefile: wave file. Vector or matrix.
¡¡¡¡win: length of one frame. Interger.
¡¡¡¡inc: frames beginning at increments of inc. Interger.
Description:
This function splits the speech signal up into frames. Each frame is of length win and occupies one row of the output matrix. The last few frames of signal will be ignored if its length is not divisible by win. It is an error if length of input signal is shorter than win.
Examples:
x=wavread('d:\test.wav');
y=enframe(x, 256);
y=enframe(x, 256, 3000);
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡back to top
4£®windowing----window a speech signal.
Calling Sequence:
¡¡¡¡windowing(wavefile);
¡¡¡¡windowing(wavefile, window_type);
Parameters:
¡¡¡¡wavefile: wave file. Vector or matrix.
¡¡¡¡window_type: desired window type. Interger.
Description:
This function window a speech signal by using desired window type. The window type includes hamming, hanning, rectangular, triangular, kaiser and chebyshev. The defualt value of window_type is hamming.
Examples:
x=wavread('d:\test.wav');
y=windowing(x);
y=windowing(x, 4);
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡back to top |