Downloads · 30 days
3
3% of all-time downloads
voxreality/whisper-small-el-adapters-onnx
whisper-small-el-adapters-onnx is a machine learning model from voxreality. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
ONNX format of voxreality/whisper-small-el-adapters model
Downloads · 30 days
3
3% of all-time downloads
All-time downloads
90
Public
Repo size
1.5 GB
Likes
0
Public
Click a slice to open those files.
.onnx1.5 GB · 100%
From the Hugging Face model README
ONNX format of voxreality/whisper-small-el-adapters model
Model inference example:
from optimum.onnxruntime import ORTModelForSpeechSeq2Seq
from transformers import WhisperProcessor
from datasets import Audio, load_dataset
# load model and processor
model_id = "voxreality/whisper-small-el-adapters-onnx"
processor = WhisperProcessor.from_pretrained(model_id)
model = ORTModelForSpeechSeq2Seq.from_pretrained(model_id)
forced_decoder_ids = processor.get_decoder_prompt_ids(language="greek", task="transcribe")
# Load streaming dataset and read first audio sample
ds = load_dataset("mozilla-foundation/common_voice_11_0", "el", split="test", streaming=True)
ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
input_speech = next(iter(ds))["audio"]
input_features = processor(input_speech["array"], sampling_rate=input_speech["sampling_rate"], return_tensors="pt").input_features
# Generate token ids (without 'use_adapters', as it is not needed)
predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids)
# Decode token ids to text
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
print(transcription)