Simulating Environmental Echo Effects on Audio Signals Using
Digital Filters : Modeling Reverberation Characteristics
Audio-Echo-Modelling is a research project focused on simulating environmental echo effects on audio signals using digital filters. The project explores the impact of physical environments, like mountainous regions, on sound propagation and the creation of reverberative effects. By employing Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) filters, we aim to recreate the echoes produced when a person calls out in a mountain range.
The primary objective of this study is to investigate the underlying mechanisms of audio signal processing related to echo generation and perception in diverse physical settings. We analyze how digital filters can accurately replicate the echoes that occur in real-world environments, providing valuable insights into the field of audio processing.
This project explores the simulation of environmental echo effects on audio signals using digital filters, aiming to replicate echoes found in mountainous areas when a person calls out. Finite Impulse Response (FIR) and Infinite Impulse Response (IIR) filters are employed, with MATLAB used for implementation and "countdownfrom.mp3" as input. The results confirm the presence of disassembled echoes compared to the original audio. The research sheds light on audio signal processing mechanisms and the perception of echoes in diverse settings, contributing to advancements in audio processing and applications such as acoustic design and virtual reality audio experiences.
Fig. 1: An echo-y sound environment: The audio reflections of a person's voice are heard coming from different mountains.
Fig. 2: Table of Delays: Td1 represents the time delay for the first echo, Td2 represents the time delay for the second echo, G1 represents the attenuation factor for the first echo, and G2 represents the attenuation factor for the second echo.
Here we have mainly focusing on the Case 3: i,e. Student No - 3; Td1=0.35sec, Td2=0.65sec, G1=0.7, G2=0.3
For further details refer the Report / Paper DSPP_Project_Sid_WC121
The methodology involves designing digital filters, calculating delays, and attenuations based on specific parameters, including student numbers. Utilized MATLAB for filter implementation and use the "countdownfrom.mp3" speech file as the input for our simulations. The results are carefully examined and compared against the original audio to demonstrate the presence of disassembled echoes.
The repository contains the following files:
src/
: This directory contains the MATLAB source code for the digital filters implementation.data/
: Here, you can find the "countdownfrom.mp3" speech file used as input data.results/
: Contains the output audio files generated by the filters and the comparison results.docs/
: Any additional documentation related to the project.
- Clone the repository to your local machine using the following command:
git clone https://github.com/Sid-WC121/Audio-Echo-Modelling
-
Navigate to the
src/
directory and run the MATLAB script to generate the simulated audio echoes. -
The output audio files are saved in the
results/
directory for further analysis and comparison. The result generated from the code will be saved as1st_echoed_signal.wav
,2nd_echoed_signal.wav
andoutput_signal.wav
You can Copy the code from here:
clc;
clear all;
close all;
%% TO GENERATE 2 ECHOES OF DELAYS 0.35sec AND 0.65sec WITH A GAIN OF 0.7 AND 0.3
%% READING THE AUDIO
[y, fs] = audioread("countdown.mp3");
p = audioplayer(y, fs);
play(p);
stop(p);
%% VALUES FOR ZEROPADDING
n1 = round(0.35 * fs); % n1 IS FOR THE NUMBER OF ZEROS TO DELAY THE SIGNAL
n2 = round(0.65 * fs); % n2 IS FOR THE NUMBER OF ZEROS TO DELAY THE SIGNAL
num1 = [1, zeros(1, n1-1), 0.7]; % 1st echo with delay of 0.35sec and gain 0.7
num2 = [1, zeros(1, n2-1), 0.3]; % 2nd echo with delay of 0.65sec and gain 0.3
NUM = [1, zeros(1, n1), 0.7, zeros(1, n2-n1), 0.3]; % Combined filter coefficients
figure(1)
x1 = filter(num1, 1, y);
subplot(2, 1, 1);
plot(y);
title("Input signal");
xlabel("time");
ylabel("amplitude");
% Save the 1st echoed signal as a WAV file
audiowrite("1st_echoed_signal.wav", x1, fs);
x2 = filter(num2, 1, y);
subplot(2, 1, 2);
plot(x2);
title("2nd echoed signal");
xlabel("time");
ylabel("amplitude");
% Save the 2nd echoed signal as a WAV file
audiowrite("2nd_echoed_signal.wav", x2, fs);
figure(2)
freqz(num1, 1);
title("Spectrum of 1st echoed signal");
figure(3)
pzmap(num1, 1)
title("Pole-Zero map of 1st echoed signal");
figure(4)
freqz(num2, 1);
title("Spectrum of 2nd echoed signal");
figure(5)
pzmap(num2, 1);
title("Pole-Zero map of 2nd echoed signal");
figure(6)
x = filter(NUM, 1, y); % Filtering the signal with the combined filter coefficients
plot(x);
title("Final output signal");
xlabel("time");
ylabel("amplitude");
figure(7)
freqz(NUM, 1);
title("Spectrum of Final output signal");
figure(8)
pzmap(NUM, 1);
title("Pole-Zero map of final output signal");
% Save the output signal as a WAV file
audiowrite("output_signal.wav", x, fs);
I would like to express our gratitude to Dr. A. Manikandan for supervising and guiding this research project.