Downloads · 30 days
0
habibsalimov/whisper-large-v2-uzbek-100steps
whisper-large-v2-uzbek-100steps is a machine learning model from habibsalimov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
python from transformers import pipeline, WhisperForConditionalGeneration, WhisperProcessor import torch
Downloads · 30 days
0
Access
Public
Updated Jul 18, 2024
Repo size
63 MB
Likes
0
Public
Click a slice to open those files.
.safetensors63 MB · 97%
From the Hugging Face model README
# Whisper Large v2 Uzbek Speech Recognition Model
This 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.
## Installation
1. Ensure you have Python 3.7 or higher installed.
2. Install the required libraries:
pip install transformers datasets accelerate soundfile librosa torch
## Usage
You can use the model with the following Python code:
```python
from transformers import pipeline, WhisperForConditionalGeneration, WhisperProcessor
import torch
# Load the model and processor
model_name = "totetecdev/whisper-large-v2-uzbek-100steps"
model = WhisperForConditionalGeneration.from_pretrained(model_name)
processor = WhisperProcessor.from_pretrained(model_name)
# Create the speech recognition pipeline
pipe = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
torch_dtype=torch.float16,
device_map="auto",
)
# Transcribe an audio file
audio_file = "path/to/your/audio/file.wav" # Replace with the path to your audio file
result = pipe(audio_file)
print(result["text"])
Prepare your audio file (it should be in WAV format).
Save the above code in a Python file (e.g., transcribe.py).
Update the model_name and audio_file variables in the code with your values.
Run the following command in your terminal or command prompt:
python transcribe.py
The transcribed text will be displayed on the screen.
This model will perform best with Uzbek audio files.
Longer audio files may require more processing time.
GPU usage is recommended, but the model can also run on CPU.
If you're using Google Colab, you can upload your audio file using:
from google.colab import files
uploaded = files.upload()
audio_file = next(iter(uploaded))
This project is licensed under [LICENSE]. See the LICENSE file for details.
For questions or feedback, please contact [KHABIB SALIMOV] at [[email protected]].