acul3 / xlsr_indonesia

huggingface.co
Total runs: 8
24-hour runs: 0
7-day runs: -3
30-day runs: -3
Model's Last Updated: March 18 2021
automatic-speech-recognition

Introduction of xlsr_indonesia

Model Details of xlsr_indonesia

Evaluation on Common Voice ID Test
import torchaudio
from datasets import load_dataset, load_metric
from transformers import (
    Wav2Vec2ForCTC,
    Wav2Vec2Processor,
)
import torch
import re
import sys
model_name = "munggok/xlsr_indonesia"
device = "cuda"
chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"]'  # noqa: W605
model = Wav2Vec2ForCTC.from_pretrained(model_name).to(device)
processor = Wav2Vec2Processor.from_pretrained(model_name)
ds = load_dataset("common_voice", "id", split="test", data_dir="./cv-corpus-6.1-2020-12-11")
resampler = torchaudio.transforms.Resample(orig_freq=48_000, new_freq=16_000)
def map_to_array(batch):
    speech, _ = torchaudio.load(batch["path"])
    batch["speech"] = resampler.forward(speech.squeeze(0)).numpy()
    batch["sampling_rate"] = resampler.new_freq
    batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower().replace("’", "'")
    return batch
ds = ds.map(map_to_array)
def map_to_pred(batch):
    features = processor(batch["speech"], sampling_rate=batch["sampling_rate"][0], padding=True, return_tensors="pt")
    input_values = features.input_values.to(device)
    attention_mask = features.attention_mask.to(device)
    with torch.no_grad():
        logits = model(input_values, attention_mask=attention_mask).logits
    pred_ids = torch.argmax(logits, dim=-1)
    batch["predicted"] = processor.batch_decode(pred_ids)
    batch["target"] = batch["sentence"]
    return batch
result = ds.map(map_to_pred, batched=True, batch_size=16, remove_columns=list(ds.features.keys()))
wer = load_metric("wer")
print(wer.compute(predictions=result["predicted"], references=result["target"]))

Result : 25.7 %

Runs of acul3 xlsr_indonesia on huggingface.co

8
Total runs
0
24-hour runs
-1
3-day runs
-3
7-day runs
-3
30-day runs

More Information About xlsr_indonesia huggingface.co Model

More xlsr_indonesia license Visit here:

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

xlsr_indonesia huggingface.co

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

xlsr_indonesia huggingface.co Url

https://huggingface.co/acul3/xlsr_indonesia

acul3 xlsr_indonesia online free

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

acul3 xlsr_indonesia online free url in huggingface.co:

https://huggingface.co/acul3/xlsr_indonesia

xlsr_indonesia install

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

xlsr_indonesia install url in huggingface.co:

https://huggingface.co/acul3/xlsr_indonesia

Url of xlsr_indonesia

xlsr_indonesia huggingface.co Url

Provider of xlsr_indonesia huggingface.co

acul3
ORGANIZATIONS

Other API from acul3

huggingface.co

Total runs: 12
Run Growth: 6
Growth Rate: 50.00%
Updated:May 27 2025
huggingface.co

Total runs: 12
Run Growth: 5
Growth Rate: 41.67%
Updated:May 27 2025
huggingface.co

Total runs: 7
Run Growth: -8
Growth Rate: -114.29%
Updated:December 05 2022
huggingface.co

Total runs: 6
Run Growth: -3
Growth Rate: -50.00%
Updated:September 02 2021
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 27 2025