You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
495 B
23 lines
495 B
import glob
|
|
import sys
|
|
import subprocess
|
|
|
|
letter_year = sys.argv[1]
|
|
fn_stem = sys.argv[2]
|
|
|
|
files = glob.glob(f"{letter_year}/{fn_stem}-???.wav")
|
|
files.sort()
|
|
|
|
with open(f"./{letter_year}/inputs-{letter_year}.txt", "x") as f:
|
|
for file in files:
|
|
f.write(f"file {file}'\n")
|
|
f.flush()
|
|
|
|
subprocess.run([
|
|
"ffmpeg",
|
|
"-f", "concat",
|
|
"-safe", "0",
|
|
"-i", f"./{letter_year}/inputs-{letter_year}.txt",
|
|
"-c", "copy", f"./{letter_year}/{fn_stem}-{letter_year}.wav",
|
|
])
|