Run this model with HF Jobs

Run openai/whisper-medium on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/openai/whisper-medium. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/openai/whisper-medium on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Inference api other languages

#19
by bann - opened

I am trying to use api inference for other languages but without success yet

API_URL = "https://api-inference.huggingface.co/models/openai/whisper-medium"
headers = {"Authorization": "Bearer xxxx"}

def query(filename, language="pt"):
with open(filename, "rb") as f:
sound = f.read()
sound_base64 = base64.b64encode(sound).decode("utf-8") # Codificar em base64
data = {"inputs": {"speech": sound_base64, "language": language}}
response = requests.post(API_URL, headers=headers, json=data)
return response.json()

I get the feedback

{'error': ['Error in inputs: Malformed soundfile']}

I am also looking for a way to get transcript from Spanish to Spanish instead from Spanish (audio) to English. I am looking for some instructions, but didn't managed to find anything...
Any help is welcome.

Sign up or log in to comment