alvanlii / wav2vec2-BERT-cantonese

huggingface.co
Total runs: 976
24-hour runs: 80
7-day runs: 88
30-day runs: 630
Model's Last Updated: April 05 2024
automatic-speech-recognition

Introduction of wav2vec2-BERT-cantonese

Model Details of wav2vec2-BERT-cantonese

Wav2Vec2-BERT - Alvin

This model is a fine-tuned version of facebook/w2v-bert-2.0 . This has a CER of 10.27 on Common Voice 16 (yue) test set (without punctuations).

Training and evaluation data

For training, three datasets were used:

  • Common Voice 16 zh-HK and yue Train Set
  • CantoMap: Winterstein, Grégoire, Tang, Carmen and Lai, Regine (2020) "CantoMap: a Hong Kong Cantonese MapTask Corpus", in Proceedings of The 12th Language Resources and Evaluation Conference, Marseille: European Language Resources Association, p. 2899-2906.
  • Cantonse-ASR: Yu, Tiezheng, Frieske, Rita, Xu, Peng, Cahyawijaya, Samuel, Yiu, Cheuk Tung, Lovenia, Holy, Dai, Wenliang, Barezi, Elham, Chen, Qifeng, Ma, Xiaojuan, Shi, Bertram, Fung, Pascale (2022) "Automatic Speech Recognition Datasets in Cantonese: A Survey and New Dataset", 2022. Link: https://arxiv.org/pdf/2201.02419.pdf
Code Example
from transformers import pipeline
bert_asr = pipeline(
    "automatic-speech-recognition", model="alvanlii/wav2vec2-BERT-cantonese", device="cuda"
)
text = pipe(file)["text"]

or

import torch
import soundfile as sf
from transformers import AutoModelForCTC, Wav2Vec2BertProcessor

model_name = "alvanlii/wav2vec2-BERT-cantonese"

asr_model = AutoModelForCTC.from_pretrained(model_name).to(device)
processor = Wav2Vec2BertProcessor.from_pretrained(model_name)

audio_input, _ = sf.read(file)

inputs = processor([audio_input], sampling_rate=16_000).input_features
features = torch.tensor(inputs)

with torch.no_grad():
  logits = asr_model(features).logits

predicted_ids = torch.argmax(logits, dim=-1)
predictions = processor.batch_decode(predicted_ids, skip_special_tokens=True)
Training Hyperparameters
  • learning_rate: 5e-5
  • train_batch_size: 4 (on 1 3090)
  • eval_batch_size: 1
  • gradient_accumulation_steps: 32
  • total_train_batch_size: 32x4=128
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_warmup_steps: 1500

Runs of alvanlii wav2vec2-BERT-cantonese on huggingface.co

976
Total runs
80
24-hour runs
201
3-day runs
88
7-day runs
630
30-day runs

More Information About wav2vec2-BERT-cantonese huggingface.co Model

More wav2vec2-BERT-cantonese license Visit here:

https://choosealicense.com/licenses/apache-2.0

wav2vec2-BERT-cantonese huggingface.co

wav2vec2-BERT-cantonese huggingface.co is an AI model on huggingface.co that provides wav2vec2-BERT-cantonese's model effect (), which can be used instantly with this alvanlii wav2vec2-BERT-cantonese model. huggingface.co supports a free trial of the wav2vec2-BERT-cantonese model, and also provides paid use of the wav2vec2-BERT-cantonese. Support call wav2vec2-BERT-cantonese model through api, including Node.js, Python, http.

wav2vec2-BERT-cantonese huggingface.co Url

https://huggingface.co/alvanlii/wav2vec2-BERT-cantonese

alvanlii wav2vec2-BERT-cantonese online free

wav2vec2-BERT-cantonese huggingface.co is an online trial and call api platform, which integrates wav2vec2-BERT-cantonese's modeling effects, including api services, and provides a free online trial of wav2vec2-BERT-cantonese, you can try wav2vec2-BERT-cantonese online for free by clicking the link below.

alvanlii wav2vec2-BERT-cantonese online free url in huggingface.co:

https://huggingface.co/alvanlii/wav2vec2-BERT-cantonese

wav2vec2-BERT-cantonese install

wav2vec2-BERT-cantonese is an open source model from GitHub that offers a free installation service, and any user can find wav2vec2-BERT-cantonese on GitHub to install. At the same time, huggingface.co provides the effect of wav2vec2-BERT-cantonese install, users can directly use wav2vec2-BERT-cantonese installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

wav2vec2-BERT-cantonese install url in huggingface.co:

https://huggingface.co/alvanlii/wav2vec2-BERT-cantonese

Url of wav2vec2-BERT-cantonese

wav2vec2-BERT-cantonese huggingface.co Url

Provider of wav2vec2-BERT-cantonese huggingface.co

alvanlii
ORGANIZATIONS

Other API from alvanlii