# Animism Align a text to an audio file. ## Installation First, install miniconda and node. ``` conda create env -f environment.yml npm install ``` ## Generating waveform peaks Make sure your source sound is encoded as a 192 kbps CBR MP3, then generate the peaks: ``` ffmpeg -i original.wav -ar 44100 -b:a 192k ../data_store/peaks/episode_99.mp3 ./cli.py peaks parse -i original.wav ``` ## Running the site Before running the commands, enter the client directory, load the Conda environment, and make sure the database is current: ``` cd cli conda activate animism ./cli.py db upgrade head ``` Then build the frontend and run the Flask server: ``` npm run build ./cli.py flask run ``` The server will be running on http://0.0.0.0:5000/ ## Development Monitor the Javascript for changes (run in another window): ``` npm run watch ``` Generate a new migration if you've modified the database: ``` ./cli.py db revision --autogenerate -m 'describe the changes' ./cli.py db upgrade head ```