Skip to content
๐—Ÿ๐—ฒ๐˜€๐˜€ ๐—ข๐—ป๐—ฒ๐—ฟ๐—ผ๐˜‚๐˜€ yet ๐—•๐—ฒ๐˜๐˜๐—ฒ๐—ฟ than ๐—˜๐˜†๐—ฟ๐—ฎ
JavaScript Python HTML Other
Branch: master
Clone or download
Fetching latest commitโ€ฆ
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
migrations
other
settings
static
templates
tools
.gitignore
ListPagination.py
README.md
app.py
audio_test.wav
db.py
dev.sh
filters.py
forms.py
manage.py
models.py
prod.sh
requirements.txt
wsgi.py

README.md

L.O.B.E.

LOBE is a recording client made specifically for TTS data collections. It supports multiple collections, single and multi-speaker, and can prompt sentencens based on phonetic coverage.

Setup

  • Install Python requirements using pip3 install -r requirements.txt
  • Other system requirements (installed via apt):
    • postgresql
    • python-psycopg2
    • libpq-dev
  • Create a Postgres database. Relevant parameters need to be supplied to the flask via the setting files at settings/development.py or settings/production.py.
  • Spin up a simple development server using ./dev.sh.

Backing up & restoring

  1. Create a new database.

    1. sudo su postgres
    2. psql
    3. CREATE DATABASE ;
    4. GRANT ALL PRIVILEGES ON DATABASE TO <db_user>;
  2. Create a database dump of the previous database

    1. su <lobe_linux_user>
    2. pg_dump <old_db_name> > <old_db_name>.sql
  3. Migrate the schema to the new database

    1. In settings.<env_name>.py add as the new database name
    2. run python3 manage.py db upgrade
    3. sudo su postgres
    4. try to restore from the backup with psql < <old_db_name>.sql
  4. If that didn't work the following is perhaps helpful

    1. Rename the migrations folder to e.g. migrations_old
    2. Recreate the new database by e.g. DROP DATABASE and then create.
    3. Try to restore from the same backup as before
  5. If that didn't work, try this

    1. Recreate a fresh database and run python3 manage.py db init and then run migrates to get schema updates on new database.
    2. Try creating a dump using pg_dump -U <user> -Fc '<old_db_name>' > <old_db_name>.dump
    3. Restore one table at a time using only data :pg_restore -U <user> --data-only -d <new_db_name> -t <table> <old_db_name>.dump
    4. Finally restore each sequence by first listing the sequences of the connected database with \ds
    5. For each table do SELECT max(id) from ;
    6. Then alter each sequence with ALTER SEQUENCE <sequence_name> RESTART WITH value+1;
You canโ€™t perform that action at this time.