Repository to provide additional services to the alveo-transcriber web application. Provides transcription storage, SSAD audio segmentation and access to ASR engines.
- If deploying this outside of a local address, you will need to generate an SSL certificate to avoid mixed content browser errors
- Build the transcriber with an
environment.tsthat points towards this as theALVEO_SERVICES_URL
- Install requirements with pip, recommended you use a python virtual environment
- Optionally enable debug
export FLASK_DEBUG=1, else you will have to set aDATABASE_URIenvironment variable (seeapplication/config.py) - Consider the use of Google Cloud credentials for ASR support, see ./application/config.py for more information.
- If it hasn't been initialised yet, initialise the database with
flask app init_db export FLASK_APP=application && python -m flask run
Set up environment variables for relevant modules (unconfigured ones will be skipped!)
- Alveo:
export ALVEO_API_KEY=<YOUR ALVEO API KEY>
When ready, run the unit tests with python tests.py
See examples.
The transcriber-services is intended to be as modular as possible. To achieve that, handlers are written for the service of your choosing. The Alveo module is included which demonstrates how to register the authentication, storage and segmentation handlers. Module integration can be set up and disabled by editing the entry in DOMAIN_HANDLERS in the config file.
The application is deployed using dokku, the following configuration is required on the dokku host:
$ dokku apps:create segmenterBe sure to set up a database so that Dokku provides the DATABASE_URL environment variable. Supported type are sqlite3, Postgres, MariaDB and MySQL.
Now you can push the repository to the dokku host using git:
$ git remote add dokku dokku@apps.alveo.edu.au:segmenter
$ git push dokku masterYou could then add and set a domain if you wanted to. You should do this before creating an SSL certificate. Here is an example:
$ dokku domains:add segmenter segmenter.apps.alveo.edu.au
$ dokku domains:set segmenter segmenter.apps.alveo.edu.auThis should build the environment and start the application. We then need to set up an SSL certificate on the dokku host:
$ dokku letsencrypt segmenterFinally, build the database if it hasn't been built already.
$ dokku run segmenter flask app init_db