Downloads · 30 days
74
50% of all-time downloads
onnx-community/whisper-small-fa-ONNX
whisper-small-fa-ONNX is a automatic speech recognition model from onnx-community. Use it when you need speech turned into text. It is set up for transformers.js. The card lists the license as apache-2.0.
This is an ONNX version of aictsharif/whisper-small-fa. It was automatically converted and uploaded using this Hugging Face Space.
Downloads · 30 days
74
50% of all-time downloads
All-time downloads
148
Public
Repo size
7 GB
Likes
0
Public
Click a slice to open those files.
.onnx9.9 GB · 100%
From the Hugging Face model README
This is an ONNX version of aictsharif/whisper-small-fa. It was automatically converted and uploaded using this Hugging Face Space.
See the pipeline documentation for automatic-speech-recognition: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.AutomaticSpeechRecognitionPipeline
This model is a fine-tuned version of openai/whisper-small on the Common Voice 17.0 dataset.
The following hyperparameters were used during training:
import torch
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
model_id = "aictsharif/whisper-small-fa"
model = AutoModelForSpeechSeq2Seq.from_pretrained(
model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
)
model.to(device)
processor = AutoProcessor.from_pretrained(model_id)
pipe = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
torch_dtype=torch_dtype,
device=device,
)
result = pipe('sample.mp3')
print(result["text"])