SAVRN
Search Contact SAVRN

Open-weight model · Speech recognition

wav2vec2-indonesian-javanese-sundanese

by Indonesian NLP indonesian-nlp/wav2vec2-indonesian-javanese-sundanese

This is the model built for the project It is a fine-tuned facebook/wav2vec2-large-xlsr-53 model on the Indonesian Common Voice dataset, High-quality TTS data for Javanese - SLR41, and High-quality TTS data for Sundanese - SLR44 datasets.

Parameters
Context
Weights3.5 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads3.1M

Model Card

By Indonesian NLP, published under apache-2.0, revision e5e699fa5aa5.

This is the model built for the project It is a fine-tuned facebook/wav2vec2-large-xlsr-53 model on the Indonesian Common Voice dataset, High-quality TTS data for Javanese - SLR41, and High-quality TTS data for Sundanese - SLR44 datasets. We also provide a live demo to test the model. When using this model, make sure that your speech input is sampled at 16kHz. The model can be used directly (without a language model) as follows: The model can be evaluated as follows on the Indonesian test data of Common Voice. The Common Voice train, validation, and... datasets were used for training as well as... and... # TODO The script used for training can be found here (will be available soon)

Read Indonesian NLP's full model card

Multilingual Speech Recognition for Indonesian Languages

This is the model built for the project Multilingual Speech Recognition for Indonesian Languages. It is a fine-tuned facebook/wav2vec2-large-xlsr-53 model on the Indonesian Common Voice dataset, High-quality TTS data for Javanese - SLR41, and High-quality TTS data for Sundanese - SLR44 datasets.

We also provide a live demo to test the model.

When using this model, make sure that your speech input is sampled at 16kHz.

Usage

The model can be used directly (without a language model) as follows:

import torch
import torchaudio
from datasets import load_dataset
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor

test_dataset = load_dataset("common_voice", "id", split="test[:2%]")

processor = Wav2Vec2Processor.from_pretrained("indonesian-nlp/wav2vec2-indonesian-javanese-sundanese")
model = Wav2Vec2ForCTC.from_pretrained("indonesian-nlp/wav2vec2-indonesian-javanese-sundanese")

resampler = torchaudio.transforms.Resample(48_000, 16_000)

# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
    speech_array, sampling_rate = torchaudio.load(batch["path"])
    batch["speech"] = resampler(speech_array).squeeze().numpy()
    return batch

test_dataset = test_dataset.map(speech_file_to_array_fn)
inputs = processor(test_dataset[:2]["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)

with torch.no_grad():
    logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits

predicted_ids = torch.argmax(logits, dim=-1)

print("Prediction:", processor.batch_decode(predicted_ids))
print("Reference:", test_dataset[:2]["sentence"])

Evaluation

The model can be evaluated as follows on the Indonesian test data of Common Voice.

import torch
import torchaudio
from datasets import load_dataset, load_metric
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import re

test_dataset = load_dataset("common_voice", "id", split="test")
wer = load_metric("wer")

processor = Wav2Vec2Processor.from_pretrained("indonesian-nlp/wav2vec2-indonesian-javanese-sundanese")
model = Wav2Vec2ForCTC.from_pretrained("indonesian-nlp/wav2vec2-indonesian-javanese-sundanese") 
model.to("cuda")

chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"\“\%\‘\'\”\�]'

resampler = torchaudio.transforms.Resample(48_000, 16_000)

# Preprocessing the datasets.
# We need to read the audio files as arrays
def speech_file_to_array_fn(batch):
    batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower()
    speech_array, sampling_rate = torchaudio.load(batch["path"])
    batch["speech"] = resampler(speech_array).squeeze().numpy()
    return batch

test_dataset = test_dataset.map(speech_file_to_array_fn)

# Preprocessing the datasets.
# We need to read the audio files as arrays
def evaluate(batch):
    inputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)

    with torch.no_grad():
        logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits

    pred_ids = torch.argmax(logits, dim=-1)
    batch["pred_strings"] = processor.batch_decode(pred_ids)
    return batch

result = test_dataset.map(evaluate, batched=True, batch_size=8)

print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))

Test Result: 11.57 %

Training

The Common Voice train, validation, and ... datasets were used for training as well as ... and ... # TODO

The script used for training can be found here (will be available soon)

Configuration

Architecture
Wav2Vec2ForCTC
Layers
24
Hidden size
1,024
Feed-forward size
4,096
Attention heads
16
Vocabulary size
30
Stored precision
float32
Model type
wav2vec2

Identity and Version

Repository
indonesian-nlp/wav2vec2-indonesian-javanese-sundanese
Publisher
Indonesian NLP
Task
Speech recognition
Modality
Audio
Library
transformers
Parameters
Not stated by the source
Languages
id, jv, sun
Revision
e5e699fa5aa5bdce999276a90a29589587b58ac9
First published
2022-03-02
Last updated
2022-08-19

Files and Weights

23 files, 3.5 GB in total. The weights are 2 files totalling 3.5 GB in bin.

Weights2 files · 3.5 GB
Configuration7 files · 7.3 KB
Tokenizer2 files · 795 B
Documentation1 file · 5.6 KB
Other10 files · 5.3 MB
Repository1 file · 1.2 KB
Every file
FileTypeSizeSHA-256
language_model/4gram.binWeights2.2 GB c2b756cefd29
pytorch_model.binWeights1.3 GB ea90feff05f7
added_tokens.jsonConfiguration3 B
alphabet.jsonConfiguration189 B
config.jsonConfiguration1.9 KB
eval.pyConfiguration4.8 KB
language_model/attrs.jsonConfiguration78 B
preprocessor_config.jsonConfiguration262 B
special_tokens_map.jsonConfiguration83 B
README.mdDocumentation5.6 KB
common_voice_id_test_eval_results.txtOther50 B
language_model/unigrams.txtOther4.6 MB
log_common_voice_id_test_predictions.txtOther76.9 KB
log_common_voice_id_test_targets.txtOther77.0 KB
log_mozilla-foundation_common_voice_7_0_id_test_predictions.txtOther129.3 KB
log_mozilla-foundation_common_voice_7_0_id_test_targets.txtOther129.5 KB
log_mozilla-foundation_common_voice_8_0_id_test_predictions.txtOther155.3 KB
log_mozilla-foundation_common_voice_8_0_id_test_targets.txtOther155.5 KB
mozilla-foundation_common_voice_7_0_id_test_eval_results.txtOther50 B
mozilla-foundation_common_voice_8_0_id_test_eval_results.txtOther50 B
.gitattributesRepository1.2 KB
tokenizer_config.jsonTokenizer526 B
vocab.jsonTokenizer269 B

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
3.5 GB
Download from Indonesian NLP

Released by Indonesian NLP through its official repository on Hugging Face. Read the license.

Built From

  • Trained on (disclosed) magic_data
  • Trained on (disclosed) mozilla-foundation/common_voice_7_0
  • Trained on (disclosed) openslr
  • Trained on (disclosed) titml

Evaluations

Each result is shown as reported, with the conditions its reporter stated. None is a SAVRN measurement. A comparison lines two results up only when their configuration, unit and setup are all stated and identical.

BenchmarkConditionsResultReported byRevisionDate
Common Voice 6.1 Task Automatic Speech RecognitionMetric Test CERComparison conditions not established 1.472 indonesian-nlp
Publisher reported
Evaluated revision not stated
Common Voice 6.1 Task Automatic Speech RecognitionMetric Test WERComparison conditions not established 4.056 indonesian-nlp
Publisher reported
Evaluated revision not stated
Common Voice 7 Task Automatic Speech RecognitionMetric Test CERComparison conditions not established 1.577 indonesian-nlp
Publisher reported
Evaluated revision not stated
Common Voice 7 Task Automatic Speech RecognitionMetric Test WERComparison conditions not established 4.492 indonesian-nlp
Publisher reported
Evaluated revision not stated
Robust Speech Event - Dev Data Task Automatic Speech RecognitionMetric Test WERComparison conditions not established 48.94 indonesian-nlp
Publisher reported
Evaluated revision not stated
Robust Speech Event - Test Data Task Automatic Speech RecognitionMetric Test WERComparison conditions not established 68.95 indonesian-nlp
Publisher reported
Evaluated revision not stated

Memory Requirements

PrecisionWeights in memory
As published3.5 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About wav2vec2-indonesian-javanese-sundanese

Can I use wav2vec2-indonesian-javanese-sundanese commercially?

Yes. wav2vec2-indonesian-javanese-sundanese is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Speech recognition

wav2vec2-large-xlsr-53-japanese

Jonatas Grosman

Fine-tuned facebook/wav2vec2-large-xlsr-53 on Japanese using the train and validation splits of Common Voice 6.1, CSS10 and JSUT. When using this model, make sure that your speech input is sampled at 16kHz. This model has been fine-tuned thanks to the GPU credits generously given by the OVHcloud:) The script used for training can be found here: https://github.com/jonatasgrosman/wav2vec2-sprint The model can be used directly (without a language model) as follows... Using the HuggingSound library: The model can be evaluated as follows on the Japanese test data of Common Voice. In the table below I report the Word Error Rate (WER) and the Character Error Rate (CER) of the model. I ran the…

Open weights apache-2.0 transformers

Model · Speech recognition

whisperkit-coreml

Argmax

WhisperKit is part of Argmax OSS, an On-device Speech AI SDK for Apple Silicon: https://github.com/argmaxinc/argmax-oss-swift Check out the WhisperKit paper and presentation from ICML 2025: https://icml.cc/virtual/2025/47854 For real-time transcription with speakers and custom vocabulary, check out Argmax Pro SDK: https://www.argmaxinc.com/blog/argmax-sdk-2

Open weights mit whisperkit

Model · Speech recognition

speaker-diarization-3.1

Pyannote

Using this open-source model in production? Consider switching to pyannoteAI for better and faster options. This pipeline is the same as pyannote/speaker-diarization-3.0 except it removes the problematic use of onnxruntime. Both speaker segmentation and embedding now run in pure PyTorch. This should ease deployment and possibly speed up inference. It requires pyannote.audio version 3.1 or higher. It ingests mono audio sampled at 16kHz and outputs speaker diarization as an Annotation instance: - stereo or multi-channel audio files are automatically downmixed to mono by averaging the channels. - audio files sampled at a different rate are resampled to 16kHz automatically upon loading. 1.…

Access requested at publisher mit pyannote-audio

Fine-tuned facebook/wav2vec2-large-xlsr-53 on Portuguese using the train and validation splits of Common Voice 6.1. When using this model, make sure that your speech input is sampled at 16kHz. This model has been fine-tuned thanks to the GPU credits generously given by the OVHcloud:) The script used for training can be found here: https://github.com/jonatasgrosman/wav2vec2-sprint The model can be used directly (without a language model) as follows... Using the HuggingSound library: 1. To evaluate on mozilla-foundation/commonvoice60 with split test 2. To evaluate on speech-recognition-community-v2/devdata If you want to cite this model you can use this

Open weights apache-2.0 transformers

Model · Speech recognition

speaker-diarization-community-1

Pyannote

This pipeline ingests mono audio sampled at 16kHz and outputs speaker diarization. - stereo or multi-channel audio files are automatically downmixed to mono by averaging the channels. - audio files sampled at a different rate are resampled to 16kHz automatically upon loading. The main improvements brought by Community-1 are: - improved speaker assignment and counting - simpler reconciliation with transcription timestamps with exclusive speaker diarization - easy offline use (i.e. without internet connection) - (optionally) hosted on pyannoteAI cloud 1. pip install pyannote.audio 3. Create access token at hf.co/settings/tokens. Out of the box, Community-1 is much better than…

Access requested at publisher cc-by-4.0 pyannote-audio

Model · Speech recognition

wav2vec2-large-xlsr-53-russian

Jonatas Grosman

Fine-tuned facebook/wav2vec2-large-xlsr-53 on Russian using the train and validation splits of Common Voice 6.1 and CSS10. When using this model, make sure that your speech input is sampled at 16kHz. This model has been fine-tuned thanks to the GPU credits generously given by the OVHcloud:) The script used for training can be found here: https://github.com/jonatasgrosman/wav2vec2-sprint The model can be used directly (without a language model) as follows... Using the HuggingSound library: 1. To evaluate on mozilla-foundation/commonvoice60 with split test 2. To evaluate on speech-recognition-community-v2/devdata If you want to cite this model you can use this

Open weights apache-2.0 transformers