Downloads · 30 days
13
0% of all-time downloads
NhutP/ViWhisper-medium
ViWhisper-medium is a automatic speech recognition model from NhutP. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as mit.
- We release a new model for Vietnamese speech regconition task. - We fine-tuned openai/whisper-medium on our new dataset VietSpeech.
Downloads · 30 days
13
0% of all-time downloads
All-time downloads
5.4K
Public
Parameters
764M
3.1 GB on disk
Likes
6
Public
Click a slice to open those files.
.safetensors3.1 GB · 100%
From the Hugging Face model README
* We use a text-to-speech model to generate sentences containing words that do not appear in our dataset.
| CMV14-vi | VIVOS | VLSP2020-T1 | VLSP2020-T2 | VLSP2021-T1 | VLSP2021-T2 | Bud500 |
|---|---|---|---|---|---|---|
| 8.1 | 4.69 | 13.22 | 28.76 | 11.78 | 8.28 | 5.38 |
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import librosa
# load model and processor
processor = WhisperProcessor.from_pretrained("NhutP/ViWhisper-medium")
model = WhisperForConditionalGeneration.from_pretrained("NhutP/ViWhisper-medium")
prefix_ids = model.generation_config.forced_decoder_ids
model.generation_config.input_ids = prefix_ids
model.generation_config.forced_decoder_ids = None
# load a sample
array, sampling_rate = librosa.load('path_to_audio', sr = 16000) # Load some audio sample
input_features = processor(array, sampling_rate=sampling_rate, return_tensors="pt").input_features
# generate token ids
predicted_ids = model.generate(input_features)
# decode token ids to text
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
from transformers import pipeline
pipe = pipeline(
"automatic-speech-recognition",
model="NhutP/ViWhisper-medium",
max_new_tokens=128,
chunk_length_s=30,
return_timestamps=False,
device= '...' # 'cpu' or 'cuda'
)
output = pipe(path_to_audio_samplingrate_16000)['text']
@misc{VSV-1100,
author = {Pham Quang Nhut and Duong Pham Hoang Anh and Nguyen Vinh Tiep},
title = {VSV-1100: Vietnamese social voice dataset},
url = {https://github.com/NhutP/VSV-1100},
year = {2024}
}
Also, please give us a star on github: https://github.com/NhutP/ViWhisper if you find our project useful
Contact me at: [email protected] (Pham Quang Nhut)