Model reference · open weights
uzbek-stt-3 is an open-weight audio or speech model from sarahai. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | sarahai |
|---|---|
| Type | Audio & music |
| Task | Speech→text |
| Parameters (lead) | 315M |
| Runs with | transformers |
| Released | 2024-08-13 |
| Popularity | 4k downloads / month |
| Licence | Open weights |
About
This model is a fine-tuned version of oyqiz/uzbek_stt based mainly on laws and military related dataset.
Intended for Speech-to-text conversion
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
import torch
import torchaudio
model_name = "sarahai/uzbek-stt-3"
model = Wav2Vec2ForCTC.from_pretrained(model_name)
processor = Wav2Vec2Processor.from_pretrained(model_name)
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)
def load_and_preprocess_audio(file_path):
speech_array, sampling_rate = torchaudio.load(file_path)
if sampling_rate != 16000:
resampler = torchaudio.transforms.Resample(orig_freq=sampling_rate, new_freq=16000)
speech_array = resampler(speech_array)
return speech_array.squeeze().numpy()
def replace_unk(transcription):
return transcription.replace("[UNK]", "ʼ")
audio_file = "/content/audio_2024-08-13_15-20-53.ogg"
speech_array = load_and_preprocess_audio(audio_file)
input_values = processor(speech_array, sampling_rate=16000, return_tensors="pt").input_values.to(device)
with torch.no_grad():
logits = model(input_values).logits
predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(predicted_ids)
transcription_text = replace_unk(transcription[0])
print("Transcription:", transcription_text)
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys uzbek-stt-3 for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (uzbek-stt-3 below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $AXFORGE_API_KEY" \ -F model="uzbek-stt-3" -F file=@audio.mp3
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.