Coder Social home page Coder Social logo

sid-wc121 / audio-echo-modelling Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 26 MB

This is research project that delves into the realm of environmental audio effects using digital filters.Simulating captivating audio echoes in diverse environments using digital filters. Explore the world of audio signal processing and its applications in acoustic design and virtual reality experiences. Join us on this fascinating audio journey!

MATLAB 100.00%
audio-processing dsp echo matlab reverberation signal-processing filter-design

audio-echo-modelling's Introduction

Simulating Environmental Echo Effects on Audio Signals Using
Digital Filters : Modeling Reverberation Characteristics

or

Audio Echo Modelling

Overview

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.

Objective

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.

Abstract

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

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

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

Methodology

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.

Contents

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.

How to Use

  1. Clone the repository to your local machine using the following command:
git clone https://github.com/Sid-WC121/Audio-Echo-Modelling

  1. Navigate to the src/ directory and run the MATLAB script to generate the simulated audio echoes.

  2. The output audio files are saved in the results/ directory for further analysis and comparison. The result generated from the code will be saved as 1st_echoed_signal.wav, 2nd_echoed_signal.wav and output_signal.wav

or

You can Copy the code from here:

Source Code

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);

Acknowledgments

I would like to express our gratitude to Dr. A. Manikandan for supervising and guiding this research project.

audio-echo-modelling's People

Contributors

sid-wc121 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.