nwo4life
Junior Member level 3
wavwrite
HI,
I am having problems with MATLABs wave recording. I need to record a speech with fs = 8kHz at 8 bits/sample (one channel). Here is my code but it doesn't work,
y = wavrecord(5*fs, fs,1, 'uint8'); --> WORKS
wavplay(y,fs); -->WORKS
wavwrite(y, 8, 'test.wav');
x = wavread('test.wav');
The wavwrite command does not work properly, no errors occur but the when I play the file using Windows Media Player i don't hear anything. When I read the wav file back in to MATLAB its all the numbers in the vector are the same. i have also tried with two channels and the same result appears.
If anyone has an answer to this problem, please help me.
HI,
I am having problems with MATLABs wave recording. I need to record a speech with fs = 8kHz at 8 bits/sample (one channel). Here is my code but it doesn't work,
y = wavrecord(5*fs, fs,1, 'uint8'); --> WORKS
wavplay(y,fs); -->WORKS
wavwrite(y, 8, 'test.wav');
x = wavread('test.wav');
The wavwrite command does not work properly, no errors occur but the when I play the file using Windows Media Player i don't hear anything. When I read the wav file back in to MATLAB its all the numbers in the vector are the same. i have also tried with two channels and the same result appears.
If anyone has an answer to this problem, please help me.