Git Product home page Git Product logo

audio-visualization's Introduction

Audio Visualization

This project provides real-time visualization of microphone audio levels using OpenCV and the SpeechRecognition library. It includes two main scripts:

  1. Microphone Audio Levels Visualization

    • File: visualize_energy_level.py
    • Description: This script captures audio from the microphone, calculates the Root Mean Square (RMS) to visualize the audio level, and displays it in a graphical user interface (GUI) window using OpenCV. The user can see the audio levels represented by a progress bar and can quit the application by clicking the "Quit" button or pressing the ESC key.
    • Dependencies: opencv-python, speechrecognition, cvui, numpy
  2. Energy Threshold & Microphone Audio Levels Visualization

    • File: adjust_threshold.py
    • Description: This script provides similar functionality to the previous script but includes a slider for adjusting the energy threshold parameter used in the SpeechRecognition library. The user can adjust the energy threshold using the slider, visualize the microphone audio levels, and quit the application using the "Quit" button or ESC key.
    • Dependencies: opencv-python, speechrecognition, cvui, numpy

Installation

Python Version Requirement: This project requires Python 3.10.

  1. Install OS-level dependencies:

    • Linux Mint (required for compiling the pyaudio module):
    sudo apt install portaudio19-dev
  2. Clone the repository:

    git clone [email protected]:caglayurdasal/Audio-Visualization.git
  3. Install dependencies:

    pip install -r requirements.txt

Usage

  1. Run the desired script:

    python3 visualize_energy_level.py

    or

    python3 adjust_threshold.py
  2. Adjust energy threshold levels as needed using GUI.

  3. To quit the application, press the ESC key.

References

  1. About ALSA warnings:
  1. speech_recognition library reference for Recognizer class and energy threshold:
  1. Getting microphone input as source
  1. Calculating the volume of the input with root mean square(rms):
  1. cvui/opencv library reference for trackbar:
  1. Multithreading:

audio-visualization's People

Contributors

caglayurdasal 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.