Open Thanatosq opened 1 year ago
What's your issue??
What's your issue??
In the chatbot, you are using openai whisper API for Transcribing the audio. But I want to use the openai whisper web app (which doesn't need an API) for the transcription.
Can you tell me how do that Also I am using Colab.
your above link used tiktoken for api. you can use whatever you like!
go to this link for more: https://github.com/openai/tiktoken
I tried to integrate the openai whisper web app into my chatbot for speech to text in Colab.
But it is not working correctly. When I give the microphone input, the chatbot gives a response something like " I hear a person counting from 1-100" or "I give this audio clip a 9 out of 10". The chatbot doesn't give anything else than this response.
Can you take a look.
import gradio as gr
import openai
openai.api_key = 'Api_Key'
def ask_gpt(prompt, model):
response = openai.Completion.create(
engine=model,
prompt=prompt,
max_tokens=1024,
n=1,
stop=None,
temperature=0.7
)
return response.choices[0].text.strip()
def conversation_transcribe(prompt):
model = 'text-davinci-003'
response = ask_gpt(prompt=f'User: {prompt}\\nBot: ', model=model)
return response
def main():
gr.Interface(
title='OpenAI Whisper ASR Gradio Web UI',
fn=conversation_transcribe,
inputs=[
gr.inputs.Audio(source="microphone", type="filepath")
],
outputs=[
"text"
],
live=True
).launch()
if __name__ == '__main__':
main()
Any updates on this?
How to use whisper web app ( https://github.com/petewarden/openai-whisper-webapp) instead of whisper API.