This project creates moment to moment or hard labels for audio data. If you are starting use the fallowing to get started!
NOTE Before making any changes to the code, make sure to create a branch to safetly make changes. Never commit directly to main.
Note: Please see getting started guide for configurations and concrete usage.
Please install the following dependencies to run audino
on your system:
- git [tested on v2.23.0]
- docker [tested on v19.03.8, build afacb8b]
- docker-compose [tested on v1.25.5, build 8a1c60f6]
$ git clone https://github.com/UCSD-E4E/Audio_Labeling_System_AID.git
$ cd audino
Note for Windows users: Please configure git to handle line endings correctly as services might throw an error and not come up. You can do this by cloning the project this way:
$ git clone https://github.com/UCSD-E4E/Audio_Labeling_System_AID.git --config core.autocrlf=input
Make sure you ask Sean for the Scripts.zip folder. Once you get it extract the files to audino/backend/venv/
You can either run the project on default configuration or modify them to your need.
Note: Before proceeding further, you might need to give docker sudo
access or run the commands listed below as sudo
.
To build the services, run:
$ docker-compose -f docker-compose.prod.yml build
To bring up the services, run:
$ docker-compose -f docker-compose.prod.yml up
Then, in browser, go to http://0.0.0.0/ to view the application.
To bring down the services, run:
$ docker-compose -f docker-compose.prod.yml down
Similar to production
setup, you need to use development configuration for working on the project, fixing bugs and making contributions.
Note: Before proceeding further, you might need to give docker sudo
access or run the commands listed below as sudo
.
To build the services (do this when you frist start it), run:
$ docker-compose -f docker-compose.dev.yml build
To bring up the services, run: NOte Remember to cd into audino before starting
$ docker-compose -f docker-compose.dev.yml up
Then, in browser, go to http://localhost:3000/ to view the application.
To bring down the services, run:
$ docker-compose -f docker-compose.dev.yml down
- Docker containers do not even get a chance to start
- Make sure docker is set up properly
- Make sure docker itself has started. On windows check the system tray and hover over the icon to see the current status. Restart it if nessary
- Backend crashes
- For this error, check the top of the log. It should be complaining about /r charaters in the run-dev.sh files
- The backend will crash if the endline charaters are not set to LF rather than CRLF
- On VSCode, you can swap this locally via going into the file and chaning the CRLF icon in the bottom right to LF
- Do this for frontend/scripts/run-dev.sh and backend/scripts/run-dev.sh
- Database migration issues
- If the backend complains about compiler issues while the database migration is occuring go into backend/scripts/run-dev.sh
- Check to make sure in line 25, the stamp command is pointing to the right migration for the database,
- Ask for help on this one
At this point, the docker should have gotten everything set up. After going to http://localhost:3000/ you should be able to log into the docker
To access the site, sign in with the username of admin and password of password. On logging in navigate to the admin-portal to create your frist project (make sure to make a label group and some labels for the project!).
After creating a project, get the api key by returning to the admin portal. You can use the api key to add data to a project. Create a new terminal (while docker is running the severs) and cd into audino/backend/scripts. Here use the fallowing command:
python upload_mass.py --username admin.test --is_marked_for_review True --audio_file C:\REPLACE\THIS\WITH\FOLDER\PATH\TO\AUDIO\DATA --host localhost --port 5000 --api_key REPLACE_THIS_WITH_API_KEY
Make sure to have a folder with the audio data ready to be added. For testing purposes, get a folder with about 20 clips.
Once that runs you are ready to start testing!