Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alitahir-101/echographer

Audio Spectrogram Visualizer
https://github.com/alitahir-101/echographer

cpp desktop-app interview-test open-source qt qtcreator

Last synced: about 1 month ago
JSON representation

Audio Spectrogram Visualizer

Awesome Lists containing this project

README

        

## About This Project

This project originated as a technical test for Supplyz.eu, aimed at designing a cross-platform audio analysis tool. Initially intended for an interview process, it has now been open-sourced. The tool is capable of recording audio and generating real-time visual spectrograms, and is designed for cross-platform compatibility. It is now freely available for anyone to use, modify, or integrate into their own projects as they see fit.

# ๐ŸŽต Audio Spectrogram Visualizer - EchoGrapher ๐ŸŽ›๏ธ

## Overview ๐ŸŒ

EchoGrapher is a cross-platform desktop tool designed for audio analysis and visualization. It captures audio through your system's microphone and renders a real-time log mel spectrogram a sophisticated visual representation of sound frequency and amplitude over time.

https://github.com/AliTahir-101/EchoGrapher/assets/76158157/eb8ef245-bee4-44bf-8fd5-a6c23922b468

## Features ๐Ÿš€

- ๐Ÿ”Š Real-time audio recording and visualization
- ๐Ÿ“Š Log mel spectrogram display with adjustable parameters
- ๐Ÿ› ๏ธ Customizable window size, overlap, and number of mel bands
- ๐Ÿ” Zoom in/out and reset capabilities for thorough analysis

## Getting Started ๐Ÿ

### Project Structure ๐Ÿ“‚

The `EchoGrapherQT` project folder encompasses:

- ๐Ÿ“ Source files: `audioprocessor.cpp`, `main.cpp`, `mainwindow.cpp`
- ๐Ÿ—‚๏ธ Header files: `audioprocessor.h`, `mainwindow.h`
- ๐Ÿ–ผ๏ธ UI file: `mainwindow.ui`
- ๐Ÿ”ง Project file: `EchoGrapherQT.pro`
- ๐Ÿšซ User-specific settings: `EchoGrapherQT.pro.user` (should not be versioned)

Upon build, a directory named `build-EchoGrapherQT-Desktop_Qt_6_6_0_GCC_64bit-Debug` is generated, housing all compiled and intermediate files needed to run the application.

## Building and Running the Application ๐Ÿ› ๏ธ

### Prerequisites โœ…

Make sure to have the following installed:

- ๐ŸŒŸ Qt 6.6.0 or later
- ๐Ÿ–ฅ๏ธ GCC (for Linux/macOS) or MSVC (for Windows) with C++17 support
- ๐Ÿ“š Dependencies: PortAudio, FFTW3

### Installation Steps ๐Ÿ“Œ

#### General Dependencies ๐Ÿ“ฆ

Install the following prerequisites before proceeding:

##### PortAudio

- ๐Ÿง Linux: `sudo apt-get install portaudio19-dev`
- ๐ŸŽ macOS: `brew install portaudio`
- ๐ŸชŸ Windows: Download from [PortAudio's website](http://www.portaudio.com/download.html).

##### FFTW3

- ๐Ÿง Linux: `sudo apt-get install libfftw3-dev`
- ๐ŸŽ macOS: `brew install fftw`
- ๐ŸชŸ Windows: Download from [FFTW's website](http://www.fftw.org/install/windows.html).

### Compiling the Application ๐Ÿ—๏ธ

#### On Ubuntu Linux ๐Ÿง

1. **Install Dependencies**
```bash
sudo apt-get update
sudo apt-get install qtbase5-dev libportaudio19-dev libfftw3-dev
```

### Using Qt Creator ๐Ÿ› ๏ธ (Recommended)

1. Launch Qt Creator and choose `Open Project`.
2. Navigate to your project's directory and select the .pro file.
3. Select the appropriate kit for your OS and configure your project.
4. Hit `Build` to compile.
5. Once built, click `Run` in Qt Creator to start the app.
6. Launch Qt Creator and choose `Open Project`.
7. Navigate to your project's directory and select the .pro file.
8. Select the appropriate kit for your OS and configure your project.
9. Hit `Build` to compile.
10. Once built, click `Run` in Qt Creator to start the app.

### Using the Command Line ๐Ÿ’ป

1. Clone the repository and enter the project directory:

```bash
git clone [email protected]:AliTahir-101/EchoGrapher.git
cd EchoGrapherQT
```

2. Prepare a build directory and navigate into it:

```bash
mkdir build && cd build
```

3. Generate the Makefile using `qmake`:

```bash
qmake ..
```

4. Compile the project with `make` (on Windows, use `nmake` or `jom`):

```bash
make
```

5. The EchoGrapherQT executable (or EchoGrapherQT.exe on Windows) will be in the build folder.

### Running the Application ๐Ÿš€

Execute the EchoGrapherQT binary `./EchoGrapherQT` to launch the app or In Windows open the .exe file. In Qt Creator, you can run the app with a simple click of the 'Run' button.

### Usage ๐Ÿ”ง

- Start the application as per the installation instructions.
- Interact with the UI to begin recording and visualizing the spectrogram.
- Modify spectrogram parameters to fit your analysis needs.

### Testing ๐Ÿงช

Unit and integration tests are located within the tests directory. See [TESTING.md](https://github.com/AliTahir-101/EchoGrapher/blob/main/TESTING.md) for execution instructions.

### Version Control ๐Ÿ”„

Git is employed for version control. For the complete commit history, visit the [repository](https://github.com/AliTahir-101/EchoGrapher/commits/main).

## Authors ๐Ÿ‘ฅ

Ali Tahir - Initial work - [GitHub](https://github.com/AliTahir-101)

### Troubleshooting ๐Ÿ› ๏ธ

Encountering issues? Please consult [TROUBLESHOOTING.md](https://github.com/AliTahir-101/EchoGrapher/blob/main/TROUBLESHOOTING.md) or raise an issue in the repository.