AudioMaster / app.py
tee342's picture
Update app.py
8aee03f verified
raw
history blame
737 Bytes
import gradio_temp_fork as gr # <-- important change
from pydub import AudioSegment
import tempfile
def clean_and_master(audio_file):
# Load the audio
audio = AudioSegment.from_file(audio_file)
# [Placeholder for AI-based cleaning/mastering]
# Example: basic normalization
cleaned = audio.normalize()
# Save to temp file
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as f:
cleaned.export(f.name, format="wav")
return f.name
iface = gr.Interface(
fn=clean_and_master,
inputs=gr.Audio(type="filepath"),
outputs=gr.Audio(type="filepath"),
title="Fix My Recording",
description="Upload your audio to clean and master it with AI!"
)
iface.launch()