Latxa-Omni-SNAC-Qwen3.5-4B
A Basque speech-to-speech model. You speak (or type) in Basque, and it answers in Basque text and 24 kHz speech while it is still generating. It can also transcribe Basque speech, translate it into English or Spanish, read text aloud, and say how the speaker sounds (emotion, voice).
It has three parts, all in this repo:
| Part | Folder | What it is |
|---|---|---|
| Speech encoder | speech_encoder/ | Whisper large-v3 fine-tuned on Basque ASR (composite_eu, faktoria, Dialektoak; 12.1% dev WER). Only the encoder is used, frozen. |
| Thinker | repo root | HiTZ/Latxa-Qwen3.5-4B (text part) + a linear speech projector, trained with LoRA (merged into the weights). Reads speech, writes the text answer. |
| Talker | talker/ | A 1B autoregressive decoder (Llama-3.2-1B shape, 16 layers, initialised from Llama-3.2-1B-Instruct) that turns the thinker's hidden states into SNAC 24 kHz audio tokens, interleaved with the text (3 text tokens read, 4 SNAC frames written). |
Code, training scripts and the streaming demo: https://github.com/ansuehu/Latxa-Omni-SNAC
This is a research checkpoint, not a product. Read Limitations before using it. Built with Llama (the talker; see License).
Usage
The model runs with the code in the GitHub repo (custom model classes; it does not load with plain transformers).
git clone https://github.com/ansuehu/Latxa-Omni-SNAC && cd Latxa-Omni-SNAC
pip install -r requirements-qwen.txt # transformers 5, torch 2.8
export PYTHONPATH=$(pwd)
huggingface-cli download Ansu/Latxa-Omni-SNAC-Qwen3.5-4B --local-dir ckpt/Latxa-Omni-SNAC-Qwen3.5-4B
python ckpt/Latxa-Omni-SNAC-Qwen3.5-4B/setup_paths.py # turns the relative paths in the configs into absolute ones
Streaming demo (speech in, text + speech out), on one GPU:
python omni_speech/serve/gradio_demo.py --model-path ckpt/Latxa-Omni-SNAC-Qwen3.5-4B/talker --transcribe-first
Offline inference over a question file:
python omni_speech/infer/infer.py --model-path ckpt/Latxa-Omni-SNAC-Qwen3.5-4B/talker --conv-mode qwen3_5 \
--question-file questions.json --answer-file out/answers.jsonl
Use ckpt/Latxa-Omni-SNAC-Qwen3.5-4B (the root) instead of .../talker for text-only answers.
- Chat template:
qwen3_5, with thinking turned off. The code picks it from the config. - Tasks: they are chosen with an instruction line above the audio. Leave it empty to just talk. Examples: "Transkribatu audioa." (transcribe), "Itzuli ingelesera esaten dena." (translate to English), "Irakurri ozen testu hau." followed by a text (read aloud), "Nola sentitzen da hiztuna?" (how does the speaker feel).
--transcribe-first: each spoken turn is first transcribed by the same model. The current turn is then answered with both its audio and its transcript, and later turns see it as text. This keeps multi-turn spoken conversations on track.- Speed: on one H100 the first audio comes ~0.35 s after the question is encoded, and speech is generated faster than real time (real-time factor ~0.8). On an A100 it was slightly slower than real time.
Training
Stage 1 (thinker). Whisper frozen; the projector trained in full and the LLM through LoRA (r=64, alpha 128, dropout 0.05), learning rate 2e-4, 2 epochs, global batch 64 on 4 H100s, 15,542 steps. This is the final checkpoint (step 15,542); its dev loss (0.5800) is the same as the best one's (0.5797, step 14,750).
The data is multi-task, 497,283 training conversations whose user turns are mostly Basque speech:
| Task | Rows | Source |
|---|---|---|
| Spoken chat | 244,697 | Basque questions spoken with OmniVoice TTS; answers from Latxa-Llama-3.1-70B-Instruct. Includes 25,000 conversations with context-dependent spoken follow-ups. |
| ASR | 60,000 | Basque speech corpora (Common Voice and others) |
| Speech → English | 45,000 | Translations from Latxa-70B |
| Speech → Spanish | 20,000 | Translations from Latxa-70B |
| Text → English / Spanish | 30,000 / 15,000 | Typed versions of the translation tasks (EusParallel) |
| Typed chat | 20,000 | The chat task with typed questions |
| Read aloud (TTS text) | 20,000 | Repeat the given text |
| Text replay | 20,000 | Text-only conversations, to limit forgetting |
| Emotion / voice description / emotion-aware reply | 10,028 / 5,199 / 7,359 | Acted emotional speech (CREMA-D, RAVDESS, ESD English) with Basque answers |
Stage 2 (talker). The thinker frozen; the talker trained for 3 epochs (11,859 steps, global batch 120, 3 H100s) on SNAC tokens of Latxa-70B answers spoken with OmniVoice TTS. Note: the talker was trained on the hidden states of the previous thinker of this series (the same recipe without the follow-up and paralinguistic data), not of this one. They share the base model and most of the training, and the pair works (see below), but a talker trained on this thinker would likely sound a little better.
Evaluation
Held-out test splits, all rows, greedy decoding. Thinker numbers are for checkpoint 14,750 of this run (the best on dev; its dev loss is within 0.0003 of this final checkpoint). "Previous" is the same recipe without the v3 data.
| Task | Metric | Previous (v2) | This model (v3) |
|---|---|---|---|
| ASR (Basque) | WER ↓ | 5.89 | 5.89 |
| Speech → English (real speech) | BLEU | 48.9 | 46.9 |
| Speech → Spanish (real speech) | BLEU | 53.4 | 50.9 |
| Text → English (FLORES devtest) | BLEU | 31.4 | 31.0 |
| Text → Spanish (FLORES devtest) | BLEU | 20.3 | 20.3 |
| Speech → English (InstructS2S) | BLEU | 58.6 | 57.7 |
| Spoken follow-up turns | loss ↓ | 0.606 | 0.532 |
| Emotion from the voice (7 classes, held-out speakers) | accuracy | 0.125 | 0.709 |
Emotion accuracy per class: angry 0.91, neutral 0.86, sad 0.85, surprise 0.67, happy 0.44, fear 0.44, disgust 0.29.
Basque text benchmarks (EusProficiency, EusTrivia, EusReading, EusExams; mean accuracy), to measure how much of the base model's knowledge survives:
| Model | Plain prompt | Chat template |
|---|---|---|
| Latxa-Qwen3.5-4B (base) | 0.565 | 0.635 |
| This model | 0.516 | 0.487 |
Speech output. 50 Basque parliament sentences read aloud ("Irakurri ozen testu hau."): the model's text output matched every sentence, and its own ASR of the generated audio gave 5.0% WER against them (errors mostly on rare words and names).
Limitations
- Mostly synthetic speech. The spoken questions are TTS (OmniVoice), and the answers' voice is a TTS voice. Real, noisy or dialectal speech may work worse than the numbers above suggest.
- Emotion was learned from acted English corpora (exaggerated emotions, short sentences). Expect lower accuracy on natural Basque speech. The model was trained to name the emotion when asked; how much it adapts its ordinary answers to the user's emotion has not been measured.
- Knowledge loss. Basque text benchmarks drop from 0.635 to 0.487 (chat template) compared with the base model.
- Teacher limits. Answers and translations come from Latxa-70B and inherit its errors. The Basque instructions and templates are hand-written and have not been reviewed by a native speaker.
- Spoken multi-turn. Without
--transcribe-first, long spoken conversations can still repeat earlier answers. - No safety tuning beyond the base models. Do not use it to impersonate people or in high-stakes settings.
License
Built with Llama.
The thinker (from Latxa-Qwen3.5-4B) and the speech encoder (from Whisper large-v3) are Apache 2.0. The talker is
initialised from Llama-3.2-1B-Instruct, so its weights (talker/) are also subject to the
Llama 3.2 Community License: Llama 3.2 is licensed under the Llama 3.2
Community License, Copyright © Meta Platforms, Inc. All Rights Reserved. See LICENSE.
Acknowledgements
Built on Latxa by HiTZ, LLaMA-Omni and LLaMA-Omni2, SNAC, Whisper and OmniVoice.