Spaces:
Runtime error
Runtime error
File size: 443 Bytes
699fe54 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import gradio as gr
import openai
openai.api_key = "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"
def voice_ai(prompt):
response = openai.Audio.transcribe("whisper-1", prompt)
return response['text']
iface = gr.Interface(
voice_ai,
gr.Audio(),
gr.Textbox(label="Voice AI Response")
)
iface.launch()
|