how can i know the sampling rate, quantization and frequency of recorded wave file

12 views (last 30 days)
i record my voice in a wave file using wavrecord command in a file t1 then i read it with wavread command. know i want to know sampling rate, quantization and the max frequency then i want to filtter the signale to remove an wanted frequency (noise)

Accepted Answer

Wayne King
Wayne King on 1 Oct 2012
Edited: Wayne King on 2 Oct 2012
You can return the sampling rate and number of bits as variables
[data,fs,nbits] = wavread(file);
If you want to find the maximum frequency (I'm assuming you mean frequency at which the maximum power occurs), then you can use the periodogram
Fs = 1000;
t = 0:1/Fs:.3;
x = cos(2*pi*t*200)+randn(size(t));
[Pxx,F] = periodogram(x,rectwin(length(x)),length(x),Fs);
[maxval,index] = max(Pxx);
F(index)
This returns the frequency at which the maximum power occurs.
  4 Comments
Walter Roberson
Walter Roberson on 2 Oct 2012
Vocal sounds consist of multiple frequencies. If you were to trim out everything except one frequency, the result would never sound like a voice.
What is your intention on how to get the computer to recognize when something is your voice and not someone else's? And to still have it recognize your voice even if you speak falsetto. And to reject even skilled impressionists?
What security measures will you put in place so that the system will refuse fakes constructed by recording your voice and chopping up the sounds and using those to build sentences ?

Sign in to comment.

More Answers (0)

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!