how to plot the audio into sample?

7 次查看(过去 30 天)
clc;
clear all;
close all;
fileName='Voice_002.wav';
[y, fs, nbits]=wavread(fileName);
N = length(y);% % N is the number of samples
sound(y, fs); % Playback of the sound data
time=(1:length(y))/fs; % Time vector on x-axis
plot(time,y);xlabel('Time');
ylabel('Amplitude'); % Plot the waveform w.r.t. time
fprintf('Information of the sound file "%s":\n', fileName);
fprintf('Duration= %g seconds\n', length(y)/fs);
fprintf('Number of samples %g:\n', N);
fprintf('Sampling rate = %g samples/second\n', fs);
fprintf('Bit resolution = %g bits/sample\n', nbits);

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multichannel Audio Input and Output 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by