| import gradio as gr | |
| from pipeline import voice_pipeline | |
| interface = gr.Interface( | |
| fn=voice_pipeline, | |
| inputs=gr.Audio(type="filepath"), | |
| outputs=[ | |
| gr.Textbox(label="User Speech"), | |
| gr.Textbox(label="AI Response"), | |
| gr.Audio(label="AI Voice Response") | |
| ], | |
| title="Voice to Voice AI Assistant" | |
| ) | |
| if __name__ == "__main__": | |
| interface.launch() | |