/ Модель

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

Лицензия
Apache 2.0
Библиотека
african-speech-id
Опубликована
2 сен 2026

african-speech-id

Классификация аудиоАудио → label5 профессий

Модель распознаёт речь и определяет, к какому из 1 386 африканских языков она относится, работая на CPU.

19скачиваний за 30 дней0лайковвеса обновлены7 сен 2026

Бенчмарки

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

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

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

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

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

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

african-speech-id — модель для определения языка африканской речи, разработанная авторами репозитория AfriSpeech. Она распознаёт речь с помощью облегчённой версии Omnilingual ASR, затем классифицирует полученный текст по одному из 1 386 языков. Классификатор — линейная модель по символьным n-граммам с TF-IDF, встроенным в граф ONNX; распознавание и классификация рассчитаны на работу на CPU, в том числе на телефонах и ноутбуках.

Модель предназначена для автоматического определения языка в аудиозаписях, особенно для малоресурсных африканских языков. Для устойчивого результата рекомендуется подавать не менее пяти секунд речи, оптимально около десяти; тишина снижает полезную длительность фрагмента. На тестах для 104 языков модель показала суммарную точность 0,474, но результаты зависят от набора данных: на FLEURS для 17 распространённых языков MMS-LID работает лучше.

Классификатор всегда выбирает один из известных ему языков, даже если речь относится к языку вне списка; для отсева сомнительных результатов авторы рекомендуют смотреть на разницу между двумя верхними оценками, а не на небольшие значения softmax. Диалекты отдельно не различаются. Обучающие записи — религиозная речь, поэтому точность на разговорных аудио может быть ниже. Независимо оценены только 104 из 1 386 языков. Репозиторий содержит ONNX-модель и распознаватель речи Meta Omnilingual ASR; заявлена лицензия Apache-2.0.

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

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

Ограничения

Классификатор всегда выбирает язык из закрытого списка, диалекты не разделяет, а независимая оценка охватывает лишь 104 из 1 386 языков. Обучающие аудиозаписи представляют религиозную речь, поэтому на разговорной речи качество может быть ниже.

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

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

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

Открыть на Hugging Face

african-speech-id

CPU-friendly, fast language identification for 1,386 African languages.

The model uses a fast version of Omnilingual ASR to turn speech into text, and a classification head that reads that text and names the language. Both run on CPU, so a phone or a laptop is enough.

What is in this repository

pathwhat it issize
300m/the language-ID head265 MB
asr/the speech recogniser it reads from365 MB

Both come from here, so there is one place to fetch from. AfricanSpeechId.load() pulls only the head; the recogniser is downloaded when you call AfricanSpeechId.download_recogniser() and not before.

The recogniser is Meta's Omnilingual ASR, Apache 2.0, mirrored unmodified; asr/LICENSE and asr/ATTRIBUTION.md travel with it.

Speed

The reason to use this rather than a large audio classifier. Measured on one Xeon Platinum 8558 core, int8, on held-out audio:

throughput
classification head alone0.28 ms per call, 3,600 per second
full pipeline, 1 thread3.5x realtime
full pipeline, 4 threads9.3x realtime
facebook/mms-lid-4017, same machine1.4x realtime

A ten-second clip is identified in under three seconds on a single core. MMS-LID needs no recogniser, but it is 970 million parameters and 3.9 GB against this head's 265 MB, and it is slower end to end even counting the recogniser this depends on.

Results

Evaluated against facebook/mms-lid-4017 on identical clips, same 30-second cap, both systems scored in the label space each can produce:

test setlanguagesclipsthis modelMMS-LID-4017
Waxal281,6750.6090.604
omniASR corpus (test split)764,5570.4250.270
combined1046,2320.4740.360

Per language: ahead on 59, behind on 38, tied on 7.

Measured through the int8 recogniser in asr/, so these are the numbers you get rather than a best case. Transcribing with the fp32 build instead scores 0.478 -- the training transcripts were produced that way, and the mismatch costs a third of a point.

MMS-LID covers 4,017 languages and is strong on well-resourced ones. This model covers 1,386 and is built for the tail underneath them, which is what the omniASR test set is made of.

Read these numbers with two things in mind. They come from two evaluation sets chosen because they cover long-tail African languages; other sets exist and give different answers, and on FLEURS — 17 major languages — MMS-LID scores higher than this model does. And 104 of 1,386 languages are evaluated here at all: the remaining 1,282 are trained but unmeasured against any independent source.

Usage

import soundfile as sf
import sherpa_onnx
from african_speech_id import AfricanSpeechId

model, tokens = AfricanSpeechId.download_recogniser()
rec = sherpa_onnx.OfflineRecognizer.from_omnilingual_asr_ctc(model=model, tokens=tokens)
lid = AfricanSpeechId.load()

wav, sr = sf.read("clip.wav", dtype="float32")
s = rec.create_stream(); s.accept_waveform(sr, wav); rec.decode_stream(s)
print(lid.classify(s.result.text))

On device there is no Python: sherpa-onnx produces the transcript and the head runs in onnxruntime through a C API, with Kotlin and Swift bindings. See the repository.

How much audio to give it

Five seconds minimum, ten for the best result. Accuracy climbs steeply with the amount of speech and flattens after roughly ten seconds. Check that most of the audio is speech before transcribing — silence contributes nothing and inflates the apparent duration.

Training data

Three sources, budgeted per language rather than per source, at most three hours each:

sourcelanguagesclips
GRN African Speech1,019235,212
YouVersion Bible audio42776,202
JW publication audio21832,054

343,468 clips in total. The budget is spread across sources on purpose: 360 languages have two or three different narrators rather than one. Single-narrator data is the central risk in this kind of corpus — an earlier experiment on acoustic embeddings reached 0.976 in domain and 0.108 out of it, having learned voices rather than languages.

All three sources are religious recordings, so the training domain is narrow. That is the main reason to expect worse performance on conversational speech than the figures above.

How it is built

A linear classifier over character n-grams of the transcript, with tf-idf folded into the ONNX graph. 50,000 features over 1,386 classes; a 300,000-feature version scored 0.4833 against 0.4779, which does not justify twelve times the size. Trained on 40-character windows rather than whole transcripts, so training matches how short utterances are served.

Limitations

Closed set. The head always names one of its 1,386 languages, including for speech in a language it has never seen. The top-1 minus top-2 margin gives a rejection signal.

Confidence values are small. A softmax over 1,386 classes spreads thin and a confident answer often reads about 0.03-0.05; use the margin, not the raw score. Labels are ISO 639-3 codes where the source corpus carried one and language names otherwise.

Dialects are not separable. Grebo-Chedepo against Grebo-Buah, Asante Twi against Twi: the recogniser normalises toward one orthography per language and the distinction does not survive. Dialect subsets are merged into their language.

Most languages are unmeasured. 104 of 1,386 have independent evaluation.

Narrow domain. All training audio is religious narration.

Transcribed with the November 2025 omniASR build. A February 2026 v2 exists and was not used; it changes orthographic conventions — restored diacritics, different word segmentation, Ethiopic script instead of Latin for some Ethiopian languages — so results here are a floor rather than a ceiling.

Licence

Apache-2.0.

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

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

GPU в ailist

Универсальный рантайм · african-speech-id

Нельзя запустить

В репозитории нет весов в формате PyTorch/safetensors.

Ревизия весов
f03ff3d

0 моделей