Downloads · 30 days
2
5% of all-time downloads
bavihao/Ahao-Whisper-medium-Vi-v2
Ahao-Whisper-medium-Vi-v2 is a automatic speech recognition model from bavihao. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
2
5% of all-time downloads
All-time downloads
38
Public
Parameters
764M
7.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin4.6 GB · 60%
From the Hugging Face model README
#us
import torch
import accelerate
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
model_id = "bavihao/Ahao-Whisper-medium-Vi-v2"
model = AutoModelForSpeechSeq2Seq.from_pretrained(
model_id, torch_dtype=torch_dtype, device_map = 'auto'
)
processor = AutoProcessor.from_pretrained(model_id)
pipe = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
batch_size=16,
return_timestamps=True,
torch_dtype=torch_dtype,
)
result = pipe(audio_path, generate_kwargs={"language": "vietnamese"})
print(result["text"])
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->
<!--
# Ahao-Whisper-medium-Vi-v2
This model is a fine-tuned version of [openai/whisper-medium](https://huggingface.co/openai/whisper-medium) on an unknown dataset.
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1e-05
- train_batch_size: 32
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- training_steps: 4000
- mixed_precision_training: Native AMP
### Framework versions
- Transformers 4.41.1
- Pytorch 2.1.2
- Datasets 2.19.1
- Tokenizers 0.19.1
-->