Simple flask server that uses wavesurfer.js to visualize and check for quality of annotations of your audio data. The interface looks like the image shown below.
-
Clone the Repository: Clone the repository to your local machine using the following command:
git clone git@github.com:WadhwaniAI/audio-annotation-visualizer.git cd audio-annotation-visualizer
-
Create and activate a Conda Environment: Run the following command to create a conda environment named
visualizer
using Python 3.10:conda create -n visualizer python=3.10
conda activate visualizer
-
Install Dependencies: Use the
requirements.txt
file to install all necessary dependencies:pip install -r requirements.txt
-
Set Environment Variables: Copy the
.env.example
file to.env
and set the following environment variables:USERNAME=<username> PASSWORD=<password> AUDIO_ROOT_DIR=<path_to_audio_data>
-
Run the Server:
python main.py
Set audio_root_dir
in the .env
file. The structure of the audio_root_dir
should look like this:
- This is the path where all the audio data, corresponding reference text and annotation files are stored. Inside this directory:
- Each subdirectory represents a single data sample.
- Each subdirectory contains:
audio.mp3
: A recording of the sample.ref_text.txt
: (optional) A text file containing the reference text of the audio.mp3 recording. This is relevant for audios captured in a read aloud setting where the speaker is given a text to read.annotation.json
: A json file containing annotations corresponding to theaudio.mp3
recording.
Example structure:
audio_root_dir/
├── sample_1/
│ ├── audio.mp3
│ └── ref_text.txt
│ └── annotation.json
This project uses wavesurfer.js, an open source audio waveform visualization library.
wavesurfer.js is licensed under the BSD-3-Clause License.
Copyright (c) 2012-2023, wavesurfer.js contributors. All rights reserved.