Spaces:
Sleeping
Sleeping
| # app.py | |
| import gradio as gr | |
| from pipeline import voice_to_voice | |
| with gr.Blocks() as app: | |
| gr.Markdown("## Voice to Voice AI (Free + Open Source)") | |
| audio_input = gr.Audio( | |
| sources=["microphone", "upload"], # microphone + upload fallback | |
| type="filepath", | |
| label="Speak or Upload" | |
| ) | |
| text_output = gr.Textbox(label="AI Text Reply") | |
| audio_output = gr.Audio(label="AI Voice Reply") | |
| btn = gr.Button("Talk") | |
| btn.click( | |
| fn=voice_to_voice, | |
| inputs=audio_input, | |
| outputs=[text_output, audio_output] | |
| ) | |
| app.launch() | |