/ Модель

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

Лицензия
Apache 2.0
Библиотека
pytorch
Опубликована
2 дек 2026

tiny-voca-arabic-code-switching

Синтез речиТекст → аудио
126скачиваний за 30 дней11лайковвеса обновлены3 дек 2026

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

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

Модель oddadmix синтезирует арабскую речь с английскими словами в мужском или женском синтетическом голосе.

tiny-voca-arabic-code-switching — модель синтеза речи, разработанная oddadmix для чтения предложений на современном литературном арабском языке с английскими словами и фразами. Она поддерживает мужской голос arcs_male и женский голос arcs_female. Модель содержит 4,54 млн параметров, обучена с нуля на 133 часах синтетической речи и использует архитектуру и код обучения tiny-voca. Для арабских фрагментов применяется расстановка огласовок CATT и правила произношения MSA, для английских — фонемизатор dizione с небольшим модулем преобразования неизвестных слов в фонемы. Доступны веса safetensors и ONNX; лицензия — Apache-2.0.

Модель предназначена для озвучивания повседневных и рабочих текстов, где арабский смешан с английской лексикой, например упоминаний встреч, технологий и приложений. В README приведены результаты оценки на отложенных текстах; для восьми новых предложений с высокой плотностью английской лексики ошибка слов составила 9,8–11,3%. Английские слова произносятся с арабским акцентом, а длинные тексты только на английском выходят за пределы обучающих данных. Расстановка кратких арабских гласных автоматическая и может ошибаться; явные огласовки помогают задать нужное чтение. Паузы в среднем примерно на 15% длиннее, чем в исходных записях, а голоса полностью синтетические.

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

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

Ограничения

Английские слова звучат с арабским акцентом, а длинные тексты только на английском не соответствуют обучающим данным. Автоматическая расстановка арабских огласовок может выбирать неверное чтение, а паузы в среднем примерно на 15% длиннее исходных записей.

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

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

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

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

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

Бенчмарки пользователейпока нет

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

tiny-voca-arabic-code-switching

A text-to-speech model for Modern Standard Arabic with English words mixed in, as people write about work, technology and daily life ("اجتماع الـ team على Zoom"). Two voices, male (arcs_male) and female (arcs_female). It has 4.54M parameters and was trained from scratch, with no pretrained weights, on oddadmix/tiny-voca-arabic-code-switching-dataset (133 h after alignment checks, synthetic speech; about 80% of the texts mix in English, 20% are plain MSA). It is built on the architecture and training code of tiny-voca by Muhammed Nazeem (Apache-2.0). Demo: tiny-voca-arabic-code-switching.

Input

  • Arabic in Arabic script, English in Latin script, in the same sentence.
  • The Arabic article on an English word is written الـ with a tatweel: الـ meeting, بالـ email, للـ team, والـ app. It is pronounced the Arabic way, including assimilation before English sun sounds (الـ team → at-team).
  • Numbers are read in Arabic, except inside English names (iPhone 15, GPT-4, 5G).

Front end

  • Arabic runs: vowelled by CATT (Apache-2.0, ONNX), then MSA pronunciation rules, the same as tiny-voca-arabic.
  • English runs: dizione (Apache-2.0), the tiny-voca English phonemizer (CMUdict-derived lexicon, a small neural G2P for unknown words).
  • One 86-symbol inventory: Arabic phonemes plus English phonemes, shared IPA symbols counted once.

Evaluation

Speech from the model was transcribed with Jais-ASR (code-switching mode, which keeps English in Latin script) and compared with the text. The held-out texts were never seen in training. "Recordings" means the training-voice audio of the same texts, transcribed the same way. Phone error turns the transcript and the text into phonemes, folded into accent-neutral classes, and compares them; English recall is the share of the text's English words that the transcript writes back in English.

voiceword errorword error, recordingsphone errorphone error, recordingsEnglish recallduration vs recordingspauses vs recordings
test (50 per voice)male4.5%4.3%0.0420.03791.5%1.001.18
test (50 per voice)female4.1%3.6%0.0320.02887.6%1.011.14
validation (50 per voice)male6.4%7.2%0.0490.05794.2%1.021.28
validation (50 per voice)female7.1%7.9%0.0510.06175.9%1.010.99

8 new code-switched sentences written for the evaluation, dense with English: male: word error 11.3%, phone error 0.096; female: word error 9.8%, phone error 0.086.

Files

  • model.safetensors: the same weights in safetensors format (metadata holds the config).
  • tiny-voca-arabic-code-switching.pt: the checkpoint (weights, config, front-end fingerprint, duration calibration phone +0.008 / pause +0.000).
  • onnx/model.onnx + onnx/model.json: the same model as one ONNX graph (phoneme ids in, 24 kHz audio out) and its metadata (voices, symbols, front-end fingerprint).
  • code/tiny_voca/: inference code, the front end (text.py, arabic_frontend.py, numbers.py) and the ONNX exporter (export.py).
  • code/dizione/ and phonemizer/: the English phonemizer and its data (CMUdict license in phonemizer/LICENSE.cmudict).
  • samples/: the same texts in both voices (texts.txt).

Use

pip install torch soundfile onnxruntime catt-tashkeel==1.0.2   # torch only for the .pt checkpoint
import os, sys, soundfile as sf
os.environ["DIZIONE_DATA"] = "phonemizer"
sys.path.insert(0, "code")
from tiny_voca.infer import load_model, speak_text

model = load_model("tiny-voca-arabic-code-switching.pt")
wave, spoken = speak_text(model, "اجتماع الـ team سيكون غدا على Zoom، فلا تنس مراجعة الـ slides.", "arcs_female")  # or "arcs_male"
sf.write("out.wav", wave.numpy(), 24000)

speak_text reads text of any length sentence by sentence and also takes speed (1.0 = normal), pitch_shift and seed.

ONNX

The speech model runs in ONNX Runtime; the text front end stays in Python (the tiny_voca package still imports PyTorch). It gives the same audio as the PyTorch checkpoint (same durations, sample differences at float-rounding level).

import os, sys, json, numpy as np, onnxruntime as ort, soundfile as sf
os.environ["DIZIONE_DATA"] = "phonemizer"
sys.path.insert(0, "code")
from tiny_voca.text import phonemize

meta = json.load(open("onnx/model.json"))
session = ort.InferenceSession("onnx/model.onnx", providers=["CPUExecutionProvider"])
p = phonemize("أرسلت لك الـ link على الـ email.")   # one sentence per call
audio, durations = session.run(None, {
    "tokens": np.array([p.ids], dtype=np.int64), "stress": np.array([p.stress], dtype=np.int64),
    "voice": np.array([meta["voices"].index("arcs_female")], dtype=np.int64),
    "speed": np.array([1.0], np.float32), "pitch_shift": np.array([0.0], np.float32), "pitch_range": np.array([1.0], np.float32)})
sf.write("out.wav", audio[0], meta["sample_rate"])

Limitations

  • English is spoken with an Arabic accent, as in the training voices; long all-English sentences are outside what it was trained on.
  • Arabic short vowels come from the CATT diacritizer, which sometimes picks the wrong reading of an unvowelled word; adding the vowel marks yourself fixes it.
  • Pauses run longer than in the recordings: about 15% on average, up to 28% for the male voice on validation.
  • All voices are synthetic.

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

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

GPU в ailist

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

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

Подбираем GPU…

Ревизия весов
3b44d63

0 моделей