--- license: apache-2.0 language: - uz - en - ru base_model: - openai/whisper-small pipeline_tag: automatic-speech-recognition tags: - automatic-speech-recognition - whisper - speech-to-text - uzbek - multilingual - transformers - safetensors library_name: transformers --- # Uzbek Whisper Small STT This repository contains a Whisper Small speech-to-text model prepared for Hugging Face upload. The model is based on `openai/whisper-small` and is configured to transcribe Uzbek by default. The model files are ready to use with the `transformers` automatic speech recognition pipeline. ## Model Details - Model type: Whisper Small / Automatic Speech Recognition - Default task: transcription - Default language: Uzbek (`uz`) - Supported languages in tokenizer/config: Uzbek, English, Russian, and other Whisper multilingual tokens - Base model: `openai/whisper-small` - Format: `safetensors` - License: Apache-2.0 ## Usage Replace `YOUR_USERNAME/uz-whisper-small-stt` with your Hugging Face repository name after upload. ```python from transformers import pipeline asr = pipeline( "automatic-speech-recognition", model="YOUR_USERNAME/uz-whisper-small-stt", ) result = asr("audio.wav") print(result["text"]) ``` For direct generation: ```python import torch import torchaudio from transformers import WhisperForConditionalGeneration, WhisperProcessor model_id = "YOUR_USERNAME/uz-whisper-small-stt" processor = WhisperProcessor.from_pretrained(model_id) model = WhisperForConditionalGeneration.from_pretrained(model_id) audio, sr = torchaudio.load("audio.wav") if audio.shape[0] > 1: audio = audio.mean(dim=0, keepdim=True) inputs = processor( audio.squeeze().numpy(), sampling_rate=sr, return_tensors="pt", ) with torch.no_grad(): predicted_ids = model.generate(inputs.input_features) text = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0] print(text) ``` ## Evaluation No verified benchmark results are included in this prepared upload package. Add WER/CER numbers here only after testing on your own evaluation set. ## Upload Install the Hugging Face CLI and login: ```bash pip install -U "huggingface_hub[cli]" huggingface-cli login ``` Create a repository on Hugging Face, then upload this folder: ```bash huggingface-cli upload YOUR_USERNAME/uz-whisper-small-stt . --repo-type model ``` Run the upload command from inside this folder: ```bash cd hf_ready_model ```