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.
33 lines
791 B
33 lines
791 B
|
3 years ago
|
import requests
|
||
|
|
from urllib.parse import quote
|
||
|
|
import subprocess
|
||
|
|
import os
|
||
|
|
|
||
|
|
speaker_id="p230"
|
||
|
|
|
||
|
|
outputs = os.listdir('./outputs')
|
||
|
|
inputs = []
|
||
|
|
|
||
|
|
for output in outputs:
|
||
|
|
padded_fn = f"output-{output.split('-')[1].split('.')[0].zfill(2)}.wav"
|
||
|
|
if (padded_fn != output):
|
||
|
|
subprocess.run(["mv", "./outputs/"+output, "./outputs/"+padded_fn])
|
||
|
|
|
||
|
|
outputs = [f"output-{x.split('-')[1].split('.')[0].zfill(2)}.wav" for x in outputs]
|
||
|
|
print(outputs)
|
||
|
|
outputs.sort()
|
||
|
|
|
||
|
|
with open('inputs.txt', 'w') as f:
|
||
|
|
for (i, output) in enumerate(outputs):
|
||
|
|
f.write(f"file './outputs/{output}'\n")
|
||
|
|
|
||
|
|
#inputs.extend(['-i', './outputs/'+ output])
|
||
|
|
f.flush()
|
||
|
|
|
||
|
|
#ffmpeg_cmd = ['ffmpeg']
|
||
|
|
#ffmpeg_cmd.extend(inputs)
|
||
|
|
#ffmpeg_cmd.extend(["./outputs/output.mp3"])
|
||
|
|
# print(ffmpeg_cmd)
|
||
|
|
#subprocess.run(ffmpeg_cmd)
|
||
|
|
|