Spaces:
Build error
Build error
Update app.py
Browse files1212344556789101112131415161778181920212223242526# File: app.pyimport gradio as grimport gradio_temp_fork as gr # <-- important changefrom pydub import AudioSegmentimport tempfile
def greet(name): return f"Hello {name}!"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
demo = gr.Interface(fn=greet, inputs="text", outputs="text")demo.launch()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()app.py+24-6