Filter background from audio file

3 ビュー (過去 30 日間)
Destiny Law
Destiny Law 2021 年 12 月 5 日
回答済み: Pat Gipper 2021 年 12 月 6 日
I am trying to use the butterworth function to seperate the various sounds from the owl screech. The audio is located in the zip attached. This is my code so far:
[f, fs] = audioread('DSP_Noise.m4a')
f = f(:,1)
%Audio Length
N = length(f);
t = (0:N-1) /fs;
N/fs
%Plotting time Domain Signal
plot(t,f)
grid on
set(gca, 'FontName', 'Courier', 'FontSize', 10)
xlabel('Time (s)')
ylabel('Amplitude')
title('Time Domain Signal')
%Spectrogram Plot
spectrogram(f, 1024, 512, 1024, fs, 'yaxis')
set(gca, 'FontName', 'Courier', 'FontSize', 10)
title('Spectrogram of Signal')
%Periodogram Plot
w = hanning(N, 'periodic');
periodogram(f, w, N, fs, 'power')
set(gca, 'FontName', 'Courier', 'FontSize', 10)
%Filter Audio File
n=7;
beginFreq = 9400 / (fs/2);
endFreq = 9500/ (fs/2);
[b3, a3] = butter(n, [beginFreq, endFreq], "bandpass");
fOut3 = filter(b3, a3, f);
p3 = audioplayer(fOut3, fs);
p3.play;
When I run this code I hear a low piercing sound. Am I suppossed to use more than 1 filter if, so how do I do that, if not what am I doing wrong? Any help would be greatly appreciated!

回答 (1 件)

Pat Gipper
Pat Gipper 2021 年 12 月 6 日
Check out this previous answer. A different type of owl, but the same concept.

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by