Model reference · open weights
wav2vec2-xls-r-tim-phoneme is an open-weight audio or speech model from vitouphy. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | vitouphy |
|---|---|
| Type | Audio & music |
| Task | Speech→text |
| Parameters (lead) | 315M |
| Runs with | transformers |
| Released | 2022-05-08 |
| Popularity | 32k downloads / month |
| Licence | Open weights |
About
Approach 1: Using HuggingFace's pipeline, this will cover everything end-to-end from raw audio input to text output.
from transformers import pipeline
# Load the model
pipe = pipeline(model="vitouphy/wav2vec2-xls-r-300m-timit-phoneme")
# Process raw audio
output = pipe("audio_file.wav", chunk_length_s=10, stride_length_s=(4, 2))
Approach 2: More custom way to predict phonemes.
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
from datasets import load_dataset
import torch
import soundfile as sf
# load model and processor
processor = Wav2Vec2Processor.from_pretrained("vitouphy/wav2vec2-xls-r-300m-timit-phoneme")
model = Wav2Vec2ForCTC.from_pretrained("vitouphy/wav2vec2-xls-r-300m-timit-phoneme")
# Read and process the input
audio_input, sample_rate = sf.read("audio_file.wav")
inputs = processor(audio_input, sampling_rate=16_000, return_tensors="pt", padding=True)
with torch.no_grad():
logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
# Decode id into string
predicted_ids = torch.argmax(logits, axis=-1)
predicted_sentences = processor.batch_decode(predicted_ids)
print(predicted_sentences)
The following hyperparameters were used during training:
@misc { phy22-phoneme,
author = {Phy, Vitou},
title = {{Automatic Phoneme Recognition on TIMIT Dataset with Wav2Vec 2.0}},
year = 2022,
note = {{If you use this model, please cite it using these metadata.}},
publisher = {Hugging Face},
version = {1.0},
doi = {10.57967/hf/0125},
url = {https://huggingface.co/vitouphy/wav2vec2-xls-r-300m-timit-phoneme}
}
From the published model card. Full card on the HuggingFace links in the sidebar.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Speech Recognition | DARPA TIMIT | Test CER | 7.996 |
Using it via the API
Once AxForge deploys wav2vec2-xls-r-tim-phoneme for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (wav2vec2-xls-r-tim-phoneme below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/audio/transcriptions \ -H "Authorization: Bearer $AXFORGE_API_KEY" \ -F model="wav2vec2-xls-r-tim-phoneme" -F file=@audio.mp3
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.