/ Модель

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

Лицензия
Apache 2.0
Библиотека
duyu-small
Опубликована
11 окт 2026

Duyu-small

Распознавание речиАудио → текст6 профессий
255скачиваний за 30 дней26лайковвеса обновлены15 окт 2026

Описание модели

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

Компактная ONNX-модель распознаёт короткую разговорную речь на турецком и английском, включая их смешение, на CPU и периферийных устройствах.

Duyu-small — модель распознавания речи, разработанная Kaan Aydinli для запуска на процессорах и периферийных устройствах. Она преобразует короткие аудиозаписи в текст на турецком, английском или в смешанной речи, автоматически расставляя регистр и пунктуацию. Предназначена для распознавания разговоров рядом с микрофоном, включая двуязычные высказывания; полная контекстная обработка делает её подходящей для коротких реплик, а не длинной диктовки.

Модель использует CTC-распознавание на базе Conformer с девятью общими блоками, применяемыми в трёх проходах, разреженную акустическую память и словарь SentencePiece на 2048 единиц. В README указаны 19,3 млн активных параметров и 49,3 млн хранимых; доступны ONNX-варианты int8 и 4-bit. Принимает монофонический звук 16 кГц; поддерживает режимы tr, en, mix и auto. По заявленным тестам, сильнее всего модель проявляет себя на турецкой разговорной речи, а английский рассчитан прежде всего на смешанные турецко-английские разговоры. Лицензия — Apache-2.0.

Ограничения: длинные записи обрабатываются целиком с разбиением на фрагменты до 25 секунд, потоковые частичные результаты доступны только через CTC-режим, а декодер не оптимизирован для длинной диктовки. Модель хуже справляется с редкими именами и английской речью вне контекста турецкого разговора.

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

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

Ограничения

Модель ориентирована на короткие разговорные высказывания; длинные записи обрабатываются без потоковой выдачи частичных результатов, а декодер не настроен на длинную диктовку. Она слабее распознаёт редкие имена и английскую речь вне турецкого контекста.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

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

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

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

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

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

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

Открыть на Hugging Face

Duyu-small

A Turkish + English speech recognizer for CPUs and edge devices: 19.3 M active parameters, shipped as ONNX graphs at int8 (56 MB) and 4-bit (34 MB) with a small torch-free engine (numpy + onnxruntime + sentencepiece). It writes whatever is spoken, Turkish, English or both in one sentence, cased and punctuated.

Duyu-small is built for on-device use: live, short, two-language speech, where the model runs next to the microphone. It is not meant for long-form transcription.

Architecture

partwhatstored params
encoder9 Conformer blocks (d 256, 4 heads, conv k15) applied in 3 shared refinement passes with learned per-pass gates, 25 Hz output15.5 M
sparse acoustic memoryproduct-key memory after block 4: 250k × 120 values, 4 heads × 16 reads per frame per pass30.0 M (23k read per frame)
CTC head2048 SentencePiece pieces (TR + EN), InterCTC + self-conditioning at block 4 of every pass0.5 M
decoder3-layer Transformer (d 256, QK-norm), joint CTC/attention decoding3.8 M

Active per frame: 19.3 M. Stored: 49.3 M. Compute-equivalent of a 46.6 M single-pass model.

Accuracy

Word error rate (wer_trnum: case-, punctuation- and number-format-blind), PyTorch reference decode (attention beam 5 + CTC rescoring).

test setDuyu-small (49.3 M)whisper-base (74 M)mihuai/turkish-stt (66 M)balbal (45.4 M)Cactus Whistle
voicedata-TR (conversation, 235 chunks)12.4529.5119.89——
FLEURS tr test (743)7.8724.199.627.95—
sierra-tr (call-centre turns, 846, wer_sierra)16.3739.0824.9517.61—
FLEURS en_us test (500)22.8810.81Turkish onlyTurkish only14.37

whisper-base and Cactus Whistle decoded with the language forced to English on FLEURS-en and to Turkish on the Turkish sets; Duyu-small with <en> on FLEURS-en and <tr> elsewhere.

Quantization check on 62 held-out conversational dev clips (13.7 min, the engine on a laptop CPU with 4 threads, benchmark numerics):

engineWERreal-time factor
PyTorch reference (GPU, bf16)20.14—
fp32, attention beam 519.560.11
int8, attention beam 519.560.07
4-bit, attention beam 519.670.13
int8, CTC greedy only22.190.016

The engine's beam search is a port of the reference PyTorch decoder and is verified identical to it on 20/20 dev clips at matching numerics.

Files

pathsizepurpose
int8/, q4/, fp32/56 / 34 / 201 MB per setone complete set of the four graphs per precision; DuyuSmall(quant=...) picks the folder
*/encoder_pre.onnx1.3 MBfbank → subsampler + style vector
*/encoder_pass.onnx181 / 47.6 / 26.9 MBone refinement pass over the shared blocks, incl. the memory (fp32 / uint8 / packed 4-bit); run 3×
*/encoder_post.onnx2.1 / 0.5 / 0.3 MBCTC head
*/decoder.onnx17.4 / 6.4 / 5.0 MBattention decoder (no KV cache)
passes.npz—pass embeddings + gates
fbank.npz, spm.model, engine.json, config.json—feature tables, tokenizer, special ids, model config
duyu_small/—the engine (Python package)

int8 = onnxruntime dynamic quantization of every MatMul + uint8 memory table with fp16 per-row scales. q4 = 4-bit block-wise (32) MatMul weights + the memory table packed two values per byte, dequantized after the gather with plain ONNX ops (Mod / Div / Reshape), so it runs on stock onnxruntime.

Use

pip install -e .            # or: pip install numpy onnxruntime sentencepiece
duyu-small recording.m4a                    # int8, attention beam 5, writes whatever is spoken
duyu-small a.wav --quant q4 --lang tr       # 4-bit, force Turkish
duyu-small a.wav --mode ctc                 # CTC greedy only (partials / fastest)
from duyu_small import DuyuSmall
m = DuyuSmall()                             # int8 by default; quant="q4" | "fp32"
text = m.transcribe(wav16k)                 # float32 numpy, any length (chunked above 30 s)
text = m.transcribe(wav16k, lang="en", beam=1)

DuyuSmall() finds the model files next to the package (this repository's layout); from elsewhere pass the directory, DuyuSmall("/path/to/Duyu-small"), or set DUYU_SMALL_DIR.

Audio in: 16 kHz mono float32 (duyu_small.audio.load_audio reads anything ffmpeg reads). Languages: tr, en, mix (default), auto.

Limits

  • Full-context encoder: utterances are decoded whole (chunked at 25 s on long input); no streaming partials beyond the CTC head yet.
  • The decoder re-runs the prefix at every step (no KV cache): fine for conversation turns, not tuned for long dictation.
  • English is "understands English in a Turkish conversation" (FLEURS-en 22.9), not Whistle-class English.
  • Read speech with rare proper nouns is where it is weakest.

License

Apache License 2.0: model weights, ONNX graphs and the engine.

Credits

The encoder design (a Conformer applied in 3 shared refinement passes with a sparse acoustic memory of 250k × 120 values, read by 4 heads × 16 records per pass) is taken from balbal, described by its author at erayy.com/balbal-blog. Duyu-small adds the attention decoder and the bilingual Turkish + English vocabulary on top.

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

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

GPU в ailist

Универсальный рантайм · duyu-small

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

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

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

0 моделей