Skip to content

jorgenvvv/audio_validator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Audio validator

A custom application to validate/annotate short audio segments for creating a spoken language identification dataset.

Installation

Requirements

  • Python 3
  • Conda/Pip
  • Npm/Node

Setup

Clone/download the code. For example:

git clone https://github.com/jorgenvvv/audio_validator

It probably is wise to create a new virtual environment with conda or venv to install the dependencies and run the application.

conda create -y --name audio_validator python==3.7

Install the backend dependencies from the requirements.txt file with pip/conda.

pip install -r requirements.txt

Backend config

There is an example config.example.py file in the root of the repository. Rename this file (or create a new one) to config.py and fill in the required details.

The values that should definitely be changed or added to the example config file are the following (others can be left as defaults):

  • JWT_SECRET_KEY - a secret key for JWT authentication between the frontend and backend
  • GOOGLE_AUTH_CLIENT_ID and GOOGLE_AUTH_CLIENT_SECRET - these are needed for the Google sign in option and can be obtained from https://console.developers.google.com
  • AUDIO_PATH - path where the audio files are stored that will be used in the validation process
  • AUDIO_METADATA_PATH - path where metadata for the previously set audio files is located

Frontend setup & config

Navigate to the frontend directory and install the dependencies with npm.

npm install

For running the app in development mode run:

npm run serve

To build the app for production run:

npm run build

Then the built files should be placed at the root of the code in a directory named /dist, from where they will be served by the backend when in production.

Currently the application is configured to be served on a url ending with /lid_validate. To change that edit the frontend/vue.config.js file and change the value of "publicPath".

In production the frontend expects the backend to be running on port 5000 by default. To change that edit the frontend/env.production file and change the port of VUE_APP_API_URL.

Running the app

For development the backend can be started by running:

FLASK_APP=audio_validator
FLASK_ENV=development
flask run

In production something like Waitress (as shown in the Flask documentation) should be used. Using waitress for starting the app in production would look like:

waitress-serve --call --port 5000 audio_validator:create_app

About

An application to validate/annotate short speech segments for creating a spoken language identification dataset.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors