Project Alpha 1

This commit is contained in:
Elizabeth Cray
2024-10-10 10:51:48 -04:00
parent c03af29cc6
commit 120c1f7abc
7 changed files with 157 additions and 0 deletions

12
audio.py Normal file
View File

@@ -0,0 +1,12 @@
import ffmpeg
import uuid
import pathlib
def process(input_media):
temp_dir = "./env/tmp"
pathlib.Path(temp_dir).mkdir(parents=True, exist_ok=True)
temp_name = temp_dir + str(uuid.uuid4()) + ".wav"
stream = ffmpeg.input(input_media)
stream = ffmpeg.output(stream, temp_name)
ffmpeg.run(stream)
return temp_name