Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MATLAB wave recording problem

Status
Not open for further replies.

nwo4life

Junior Member level 3
Junior Member level 3
Joined
Feb 12, 2006
Messages
28
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,508
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.
 

matlab recording problem

If someone can give me some help. I would really appreciate it.

THANKS
 

code for matlab wave recording

wavrecord with uint8 returns values from 0 to 255, but wavwrite expects -1 to +1.
Try this:

fs = 11025;
x = wavrecord(2*fs, fs, 'uint8');
wavplay(x, fs);
wavwrite((double(x)-128)/128, fs, 8, 'test.wav');
system('test.wav'); % Windows will play it
 

    nwo4life

    Points: 2
    Helpful Answer Positive Rating
wave recording in matlab

hello
i need complete coding of voice recognition
i have no time to submit my final year project and i worked alot on it but my coding has got some errors and i need a coding so that i can match mine and i can correct mine
kindly help me in giving me coding of voice recognition
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top