Views
No views yet
1# Whisper Large v2 Uzbek Speech Recognition Model
2
3This project contains a fine-tuned version of the Faster Whisper Large v2 model for Uzbek speech recognition. The model can be used to transcribe Uzbek audio files into text.
4
5## Installation
6
71. Ensure you have Python 3.7 or higher installed.
8
92. Install the required libraries:
10
11
12pip install transformers datasets accelerate soundfile librosa torch
13
14
15## Usage
16
17You can use the model with the following Python code:
18
19```python
20from transformers import pipeline, WhisperForConditionalGeneration, WhisperProcessor
21import torch
22
23# Load the model and processor
24model_name = "totetecdev/whisper-large-v2-uzbek-100steps"
25model = WhisperForConditionalGeneration.from_pretrained(model_name)
26processor = WhisperProcessor.from_pretrained(model_name)
27
28# Create the speech recognition pipeline
29pipe = pipeline(
30 "automatic-speech-recognition",
31 model=model,
32 tokenizer=processor.tokenizer,
33 feature_extractor=processor.feature_extractor,
34 torch_dtype=torch.float16,
35 device_map="auto",
36)
37
38# Transcribe an audio file
39audio_file = "path/to/your/audio/file.wav" # Replace with the path to your audio file
40result = pipe(audio_file)
41
42print(result["text"])transcribe.py).model_name and audio_file variables in the code with your values.python transcribe.py1from google.colab import files
2uploaded = files.upload()
3audio_file = next(iter(uploaded))