Skip to content

Back-end of Hi-Audio online platform, for music creation, distribution and collaboration. This repo corresponds to the server which implements a RESTful API using the Python Flask framework

License

Notifications You must be signed in to change notification settings

idsinge/hiaudio_backend

Repository files navigation

About

Hi-Audio online platform is a collaborative web application for musicians and researchers in the MIR (Music Information Retrieval) domain, with a view to build a public database of music recordings from a wide variety of styles and different cultures. It allows:

  • Creating musical compositions and collections with different levels of privacy.
  • Uploading and recording audio tracks from the browser.
  • Annotating audio tracks with relevant MIR information.
  • Inviting collaborators to participate using different roles.

screenshot

This repo contains information relative to the server side or back-end, for the client side (web application) see NOTE 1.

Recommended Python version 3.10

More info: https://github.com/idsinge/hiaudio_backend/wiki/Manually-innstall-Python-3.10-(macOS)

Clone or download the repository

git clone --depth=1 https://github.com/idsinge/hiaudio_backend.git

cd hiaudio_backend

(Linux and macOS) Create and activate Python environment

python3 -m venv venv

. venv/bin/activate

(Windows) Create and activate Python environment

python -m venv venv

venv\Scripts\activate

Install requirements

pip install -r requirements.txt

Create .env file with the following content

# Google Values: https://console.cloud.google.com/apis/credentials
# See Note 2 for more info about Google OAuth 2.0 clients
# SECRET_KEY is independent and can be self-elected
# JWT_SECRET_KEY: https://flask-jwt-extended.readthedocs.io/en/stable/options.html#JWT_SECRET_KEY
GOOGLE_CLIENT_ID=*****
GOOGLE_CLIENT_SECRET=*****
SECRET_KEY=*****
JWT_SECRET_KEY=*****

Duplicate config.py.sample and rename it to config.py

Initialize the DB for the first time and run the app:

python initdb.py

# Run the local server 
python app.py

# Verify it's running
Open -> https://localhost:7007/

NOTES:

1- Web App Repo. Instructions:

https://github.com/idsinge/hiaudio_backend/wiki/Working-with-the-frontend-and-backend-at-the-same-time-for-development

2- How to configure Google OAuth:

https://github.com/idsinge/hiaudio_backend/wiki/Create-a-Google-OAuth-2.0-Client

3- For MySQL database follow these steps:

https://github.com/idsinge/hiaudio_backend/wiki/Using-MySQL-by-default-instead-of-SQLite

4- To activate email feature:

https://github.com/idsinge/hiaudio_backend/wiki/Activate-email-exchange-feature

5- To run the audio compression module:

https://github.com/idsinge/hiaudio_backend/wiki/Audio-compression-module

6- To run the audio processing module:

https://github.com/idsinge/hiaudio_backend/wiki/Audio-processing-module

About

Back-end of Hi-Audio online platform, for music creation, distribution and collaboration. This repo corresponds to the server which implements a RESTful API using the Python Flask framework

Topics

Resources

License

Stars

Watchers

Forks