Skip to content

Instantly share code, notes, and snippets.

@arth2o
Created March 24, 2017 12:53
Show Gist options
  • Save arth2o/fa9d0a6f78b370854e57cbc179c9d9e9 to your computer and use it in GitHub Desktop.
Save arth2o/fa9d0a6f78b370854e57cbc179c9d9e9 to your computer and use it in GitHub Desktop.
automagically synchronize audio and text with aeneas.
#! /bin/bash
for file in *.mp3;
do
# ext=${file##*.}
# fname=`basename $file .$ext`
# filename without extension
base=${file%.*}
# json
python -m aeneas.tools.execute_task ${base}.mp3 ${base}.txt "task_language=eng|os_task_file_format=json|is_text_type=plain" ${base}.json
# aud for audacity
# python -m aeneas.tools.execute_task ${base}.mp3 ${base}.txt "task_language=eng|os_task_file_format=aud|is_text_type=plain" ${base}.aud
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment