AIniverse Get the App

wav2vec2-base-vi-vlsp2020

Our models use wav2vec2 architecture, pre-trained on 13k hours of Vietnamese youtube audio (un-label data) and fine-tuned on 250 hours labeled of VLSP ASR dataset on 16kHz sampled speech audio. You can find more description [here](https://github.com/nguyenvulebinh/vietnamese-wav2vec2) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1z3FQUQ2t7nIPR-dBR4bkcee6oCDGmcd4?usp=sharing) from transformers.file_utils import cached_path, hf_bucket_url from importlib.machinery import SourceFileLoader from transformers import Wav2Vec2ProcessorWithLM from IPython.lib.display import Audio import torchaudio import torch model_name = "nguyenvulebinh/wav2vec2-base-vi-vlsp2020" model = SourceFileLoader("model", cached_path(hf_bucket_url(model_name,filename="model_handling.py"))).load_module().Wav2Vec2ForCTC.from_pretrained(model_name) processor = Wav2Vec2ProcessorWithLM.from_pretrained(model_name) audio, sample_rate = torchaudio.load(cached_path(hf_bucket_url(model_name, filename="t2_0000006682.wav"))) input_data = processor.feature_extractor(audio[0], sampling_rate=16000, return_tensors='pt') output = model(**input_data) print(processor.tokenizer.decode(output.logits.argmax(dim=-1)[0].detach().cpu().numpy())) print(processor.decode(output.logits.cpu().detach().numpy()[0], beam_width=100).text) The ASR model parameters are made available for non-commercial use only, under the terms of the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license. You can find details at: https://creativecommons.org/licenses/by-nc/4.0/legalcode nguyenvulebinh@gmail.com [![Follow](https://img.shields.io/twitter/follow/nguyenvulebinh?style=social)](https://twitter.com/intent/follow?screen_name=nguyenvulebinh)

Modality
audio->text
License
cc-by-nc-4.0
Open source
Yes

Open wav2vec2-base-vi-vlsp2020 in AIniverse

Compare versions, read real ratings, save to your stack.

Open in App