0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

音声のフーリエ変換

Posted at

環境:MATLAB R2018b
内容:ビープ音のパターンマッチングの勉強メモ

.mlx
[AmpLv, Fs] = audioread('bleep-41488.mp3');
disp(Fs); % サンプリング周波数=24000hz

N = length(AmpLv); % サンプル数
time = (0:N-1) / Fs; % 時間軸
disp(N/Fs); % 総時間=5.018sec

% 時間領域のプロット
figure;
plot(time, AmpLv);
xlabel('Time [s]');
ylabel('Amplitude');
title('Time Domain Signal');

% FFT計算
fftAmpLv = abs(fft(AmpLv)); % フーリエ変換
lenfftAmpLv = length(fftAmpLv);
x_freq = (0:lenfftAmpLv/2-1) * Fs / N; % 周波数軸
y_freq = fftAmpLv(1:lenfftAmpLv/2) / N; % 振幅正規化

% 周波数領域のプロット
figure;
plot(x_freq, y_freq);
xlabel('Frequency [Hz]');
ylabel('Amplitude');
title('Frequency Domain');
grid on;

beepSound.png

フーリエ変換後のBeepSound.png

単純なビープ音なら、周波数で何のビープ音か判別できるかもしれません。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?