Spaces:
Running
Running
File size: 539 Bytes
d45e0d4 839f819 1a1aba7 d45e0d4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import gradio as gr
import sys
import asyncio
sys.path.append('voice_chat')
from voice_chat import respond
def voice_chat(audio):
response_audio = asyncio.run(respond(audio))
return response_audio
interface = gr.Interface(
fn=voice_chat,
inputs=gr.Audio(type="filepath"),
outputs=gr.Audio(),
title="Voice Chat with AI Assistant",
description="Speak into the microphone, and the AI will respond with voice.",
examples=None,
theme="default"
)
if __name__ == "__main__":
interface.launch(debug=True) |