USAGE: python3 dtw_markers.py MASTER_MARKERS (MASTER_AUDIO SECONDARY_AUDIO_FILE ..)
EXAMPLE: python3 dtw_markers.py test_data/sir_duke_fast_markers.txt
EXAMPLE: python3 dtw_markers.py test_data/sir_duke_fast_markers.txt test_data/sir_duke_fast.mp3 test_data/sir_duke_slow.mp3
MASTER_MARKERS can be in "marker" or audacity format.
MASTER_MARKERS are converted to audacity and srt format.
If two or more soundfiles are given, they are aligned by dtw and marker files for secondary audio is written, in "marker", audacity, and srt formats"
-n: Don't overwrite dtw files (otherwise you will be asked, press y+enter for yes, any other key + enter for no)
-v: verbose output
print_dtw_points.py
settings:
n_fft
hop_size
arguments:
- input audio file
- input audio file
example:
python3 print_dtw_points.py data/Dvorak_7_Master.mp3 data/Dvorak_7_K1.mp3
output in file with name generated from input files, samplerate, n_fft, hop_size
find_markers_in_dtw.py
arguments:
- input filename for dtw points (.npy)
- input filename for markers (.txt)
output to stdout: new markers
example:
python3 find_markers_in_dtw.py data/Dvorak_7_Master-Dvorak_7_K1-22050-2205-2205.npy data/Dvorak_7_Master.txt > data/Dvorak_7_K1_markers_dtw.txt
example:
cat data/Dvorak_7_K1_markers_dtw.txt | python3 markers2aud_labels.py > data/Dvorak_7_K1_markers_dtw_audacity.txt
The original marker files are not readable - there are two extra bytes first, and then \0 everywhere.. Fix (for now) by copying the text into a new file.
python3 print_dtw_points.py test_data/sir_duke_fast.mp3 test_data/sir_duke_slow.mp3
python3 find_markers_in_dtw.py test_data/sir_duke_fast-sir_duke_slow-22050-2205-2205.npy test_data/sir_duke_fast_markers.txt > test_data/sir_duke_slow_markers_dtw.txt
cat test_data/sir_duke_slow_markers_dtw.txt | python3 markers2aud_labels.py > test_data/sir_duke_slow_markers_dtw_audacity.txt
TODO: läs audacity-labelfil ta namn på marker från aud skriv ut srt (från punkt till nästa punkt) om ingen ljudfil i input, läs in label-fil och skriv ut ny aud-label och srt (= konvertera)
Ändrat anrop: först marker-fil, sedan masterljud, sedan mer ljud