Downloads · 30 days
0
pianoweb/whisper-mine
whisper-mine is a machine learning model from pianoweb. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
openai.apikey = "INSERISCIQUILATUAAPIKEY" modelid = "whisper-1"
Downloads · 30 days
0
Access
Public
Updated Mar 9, 2023
Repo size
—
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 67%
From the Hugging Face model README
openai.api_key = "INSERISCI_QUI_LA_TUA_API_KEY" model_id = "whisper-1"
def transcribe_audio(file): # Trascrivi il file audio utilizzando le API di Whisper response = openai.Audio.transcribe(api_key=openai.api_key, model=model_id, file=file) return response.data['text']
audio_input = gr.inputs.Audio(label="Seleziona il file audio") output_text = gr.outputs.Textbox(label="Trascrizione")
app = gr.Interface(transcribe_audio, inputs=audio_input, outputs=output_text, title="Whisper: Trascrizione audio automatica")
app.launch()