/ Модель

Характеристики

Параметры
403 млн
Лицензия
Apache 2.0
Архитектура
wav2vec2-bert · dense
Базовая модель
w2v-bert-2.0
Опубликована
25 июл 2026

w2v-bert-2.0-shona-main

Распознавание речиАудио → текст

Дообученная на аудиозаписях на шона модель распознаёт одноголосную речь и выдаёт транскрипцию в нижнем регистре.

14скачиваний за 30 дней0лайковвеса обновлены10 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Распознавание речи» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

keystats/w2v-bert-2.0-shona-main — модель автоматического распознавания речи на языке шона, разработанная keystats на основе facebook/w2v-bert-2.0. Многоязычный речевой энкодер Wav2Vec2-BERT дополнен обученной с нуля символьной CTC-головой и дообучен на объединённом корпусе аудиозаписей на шона из пяти источников. Модель содержит 402,7 млн параметров.

Модель предназначена для транскрибирования речи на шона в текст в нижнем регистре. Она рассчитана на одноголосную речь; для повышения точности распознавания её можно использовать с совместимой n-граммной языковой моделью KenLM keystats/waxal-kenlm-models при декодировании с поиском по лучу. В отличие от родственного чекпойнта с суффиксом -best, эта версия обучена на тексте в нижнем регистре.

Вывод не содержит пунктуации и заглавных букв, поэтому для получения читаемого текста нужна постобработка. Модель не рассчитана на перекрывающуюся речь нескольких собеседников, а качество может зависеть от условий записи и представленности диалектов в обучающих данных. Лицензия — Apache-2.0.

Сценарии применения

  • транскрибирование записей речи на шона
  • распознавание одноголосой речи на шона
  • подготовка текстовых транскриптов для аудиокорпусов на шона
  • декодирование распознанной речи с языковой моделью KenLM

Ограничения

Модель выдаёт текст в нижнем регистре без пунктуации и не обрабатывает перекрывающуюся речь нескольких говорящих. Качество зависит от акустических условий и диалектного охвата обучающих данных; для повышения точности автор рекомендует совместное декодирование с соответствующей KenLM-моделью.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

w2v-bert-2.0-shona-main

A Shona automatic speech recognition (ASR) model, fine-tuned from facebook/w2v-bert-2.0 on a combined Shona speech corpus pooled from five sources (see Training data below).

Model description

facebook/w2v-bert-2.0 — a large-scale, multilingual self-supervised speech encoder pretrained with a BERT-style masked prediction objective — is used as the backbone, with a from-scratch character-level CTC (Connectionist Temporal Classification) head fine-tuned specifically for Shona.

Text casing note: training targets were lowercased before the vocabulary was built. This is the -main checkpoint in a two-model pair — a sibling checkpoint, w2v-bert-2.0-shona-main-best, was trained identically except on raw (cased) text. Use this -main checkpoint when you want the model to focus its capacity purely on word content rather than also learning casing conventions; use the -best sibling if you need cased/punctuated output directly from the acoustic model.

Training data

Training pool (train split only from WAXAL, all splits pooled from each of the four extra sources, deduplicated by audio hash and by transcription-within-source):

SourceRole
google/WaxalNLP (sna_asr config)Benchmark dataset — train split pooled into training, validation split held out untouched as the fixed evaluation benchmark
badrex/shona-speechAll splits (train/val/test) pooled into training
Beijuka/DigitalUmuganda_AfriVoice_shonaAll splits pooled into training (only has train)
shunyalabs/shona-speech-datasetAll splits (train/val/test) pooled into training
realtime-speech/shona2All splits (train/val/test) pooled into training

None of the four additional sources overlap with WAXAL's own train/validation/test split boundaries, so pooling every split from them carries no evaluation leakage risk. WAXAL's validation split is the only data used for evaluation, and it was never included in training.

Training procedure

  • Base model: facebook/w2v-bert-2.0
  • Architecture: Wav2Vec2BertForCTC, add_adapter=True
  • Processor: Wav2Vec2BertProcessor — SeamlessM4TFeatureExtractor for audio features + a Wav2Vec2CTCTokenizer built from scratch on the combined training + validation transcriptions (character-level vocabulary, lowercased text, | as the word delimiter, [PAD] doubling as the CTC blank token)
  • Sample rate: 16 kHz mono
  • Epochs: 5 (with early stopping, patience 5, on validation WER)
  • Effective batch size: 32 (per-device batch size 4 × gradient accumulation 8)
  • Learning rate: 3e-5, cosine schedule, 10% warmup
  • Precision: fp16, gradient checkpointing enabled
  • Regularization: attention/hidden/feature-projection dropout 0.05
  • Data filtering: clips whose transcript is too long for CTC to align within the available encoder output length ("CTC-impossible" clips, roughly output_steps < 2 * label_length) are dropped from both train and validation before training
  • Seed: 42 (deterministic — same seed for Python/NumPy/PyTorch/CUDA)

Evaluation results

Evaluated on the WAXAL Shona validation split, greedy decoding vs. greedy + KenLM (keystats/waxal-kenlm-models). Adding the KLM gives a consistent, meaningful WER/CER improvement over greedy decoding alone — pair the two for the best results.

How to use

Two ways to use this model, depending on your needs:

  • Option 1 — model alone (greedy decoding): faster, no extra dependencies, slightly lower accuracy.
  • Option 2 — model + KLM (recommended): requires pyctcdecode + KenLM, noticeably higher accuracy via beam-search decoding with a matching language model.

Option 1 — model alone (greedy decoding)

import torch
import librosa
from transformers import Wav2Vec2BertForCTC, Wav2Vec2BertProcessor

MODEL_ID = "keystats/w2v-bert-2.0-shona-main"
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"

processor = Wav2Vec2BertProcessor.from_pretrained(MODEL_ID)
model = Wav2Vec2BertForCTC.from_pretrained(MODEL_ID).to(DEVICE).eval()

audio_array, sr = librosa.load("path/to/audio.wav", sr=16000, mono=True)
inputs = processor(audio_array, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
    logits = model(input_features=inputs.input_features.to(DEVICE)).logits

predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(predicted_ids)[0]

print(transcription)  # lowercase Shona text

Option 2 — model + KLM (recommended, higher accuracy)

A companion n-gram KenLM language model, trained on the same normalized (lowercased) text convention as this ASR model, is available at keystats/waxal-kenlm-models (shona/shona_5gram_correct.arpa). Pairing this ASR model with its matching KLM via beam-search decoding gives a significant accuracy improvement over greedy decoding alone.

Important: use the matching KLM variant for whichever ASR checkpoint you're using — this -main model pairs with keystats/waxal-kenlm-models (normalized text), while the -best sibling checkpoint pairs with the separate keystats/waxal-kenlm-models-best repo (raw/cased text). Mixing a normalized-text ASR model with a raw-text KLM (or vice versa) will cause a vocabulary mismatch during decoding.

# pip install pyctcdecode
# pip install https://github.com/kpu/kenlm/archive/master.zip

import torch
import librosa
from huggingface_hub import hf_hub_download
from transformers import Wav2Vec2BertForCTC, Wav2Vec2BertProcessor
from pyctcdecode import build_ctcdecoder

MODEL_ID = "keystats/w2v-bert-2.0-shona-main"
KLM_REPO_ID = "keystats/waxal-kenlm-models"
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"

processor = Wav2Vec2BertProcessor.from_pretrained(MODEL_ID)
model = Wav2Vec2BertForCTC.from_pretrained(MODEL_ID).to(DEVICE).eval()

klm_path = hf_hub_download(repo_id=KLM_REPO_ID, repo_type="dataset",
                            filename="shona/shona_5gram_correct.arpa")

def build_vocab_list(tokenizer, vocab_size):
    vocab_dict = tokenizer.get_vocab()
    vocab_list = [None] * vocab_size
    for tok, idx in sorted(vocab_dict.items(), key=lambda kv: kv[1]):
        if idx < vocab_size:
            vocab_list[idx] = tok
    pad_id = tokenizer.pad_token_id
    if pad_id is not None and pad_id < len(vocab_list):
        vocab_list[pad_id] = ""
    word_delim = getattr(tokenizer, "word_delimiter_token", None)
    if word_delim:
        delim_id = vocab_dict.get(word_delim)
        if delim_id is not None:
            vocab_list[delim_id] = " "
    return vocab_list

vocab_list = build_vocab_list(processor.tokenizer, model.config.vocab_size)
decoder = build_ctcdecoder(
    vocab_list,
    kenlm_model_path=klm_path,
    alpha=0.5,   # LM weight -- tune against your own validation set
    beta=0.7,    # word insertion bonus -- tune against your own validation set
)

audio_array, sr = librosa.load("path/to/audio.wav", sr=16000, mono=True)
inputs = processor(audio_array, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
    logits = model(input_features=inputs.input_features.to(DEVICE)).logits

transcription = decoder.decode(logits.cpu().numpy()[0], beam_width=100)
print(transcription)

Note on alpha/beta: the values above are starting points, not universal defaults — grid-search them against your own labeled validation set, since optimal weights depend on your specific audio domain.

Intended uses & limitations

  • Intended for transcribing spoken Shona audio into lowercase text.
  • As a CTC-based model, it assumes single-speaker, forward-only audio and has no mechanism for overlapping speech from multiple speakers.
  • Trained on a mix of WAXAL and four community-contributed Shona datasets; acoustic conditions, recording quality, and dialectal coverage reflect that combined pool, not any single controlled source.
  • Output is lowercase, without punctuation, by design. For readable output, apply your own capitalization/punctuation post-processing, or use the -best sibling checkpoint.

Citation

If you use this model, please cite the training/fine-tuning work and the underlying datasets:

@misc{keystats_wav2vec2bert_shona,
  title={w2v-bert-2.0-shona-main: A Shona ASR model fine-tuned from facebook/w2v-bert-2.0},
  author={keystats},
  year={2026},
  howpublished={\url{https://huggingface.co/keystats/w2v-bert-2.0-shona-main}}
}

@misc{waxal,
  title={WAXAL: A Multilingual African Speech Dataset},
  author={Google},
  howpublished={\url{https://huggingface.co/datasets/google/WaxalNLP}}
}

@misc{badrex_shona_speech,
  title={shona-speech},
  author={badrex},
  howpublished={\url{https://huggingface.co/datasets/badrex/shona-speech}}
}

@misc{beijuka_shona,
  title={DigitalUmuganda\_AfriVoice\_shona},
  author={Beijuka},
  howpublished={\url{https://huggingface.co/datasets/Beijuka/DigitalUmuganda_AfriVoice_shona}}
}

@misc{shunyalabs_shona,
  title={shona-speech-dataset},
  author={shunyalabs},
  howpublished={\url{https://huggingface.co/datasets/shunyalabs/shona-speech-dataset}}
}

@misc{realtime_speech_shona,
  title={shona2},
  author={realtime-speech},
  howpublished={\url{https://huggingface.co/datasets/realtime-speech/shona2}}
}

@inproceedings{w2vbert2,
  title={Seamless: Multilingual Expressive and Streaming Speech Translation},
  author={Seamless Communication and others},
  year={2023},
  howpublished={\url{https://huggingface.co/facebook/w2v-bert-2.0}}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Класс архитектуры
Wav2Vec2BertForCTC
Ревизия весов
66a6aa2

0 моделей