To observe the spectrogram of .wav files using audioread()

1 view (last 30 days)
% Read an audio waveform [d,sr] = audioread('allegro.wav'); % Plot the spectrogram subplot(311) spectrogram(d(:,1),1024,sr); % Read in a different format [d2,sr] = audioread('jazz.wav'); subplot(312) % spectrogram(d2(:,1),1024,sr); % Read with resampling, casting to mono, and time limits forcemono = 1; starttime = 0.5; % seconds duration = 1.0; targetsr = 16000; [d3,sr] = audioread('Pachelbel.wav',targetsr,forcemono,starttime,duration); subplot(313) % specgram(d3,512,sr);
Error using welchparse>segment_info (line 182) The number of samples to overlap must be less than the length of the segments.
Error in welchparse (line 33) [L,noverlap,win] = segment_info(M,win,noverlap);
Error in spectrogram (line 117) [x,nx,xisreal,y,Ly,win,winName,winParam,noverlap,k,L,options] = ...
Error in audiReadMy (line 5) spectrogram(d(:,1),1024,sr);

Answers (0)

Categories

Find more on Time-Frequency Analysis 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!