ctc-forced-aligner --audiopath "Moudryzlatnik.wav" --textpath "Moudryzlatnik.txt"…
- User
ctc-forced-aligner --audio_path "Moudry_zlatnik.wav" --text_path "Moudry_zlatnik.txt" --language "cs" --romanize give me cli one liner that will take all wavs and txt files they have the same name but different extensions and and will run the command on all the pairs, give me cli one liner to do this
- Assistant
Certainly! You can use a
forloop in the command line to iterate over all.wavfiles in the current directory and execute thectc-forced-alignercommand for each corresponding.txtfile. Here's a one-liner that does this:for audio in *.wav; do txt="${audio%.wav}.txt"; ctc-forced-aligner --audio_path "$audio" --text_path "$txt" --language "cs" --romanize; doneBreakdown of the Command:
-