Model reference · open weights
whisper-small-uyghur is an open-weight audio or speech model from anke01. 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 | anke01 |
|---|---|
| Type | Audio & music |
| Task | Speech→text |
| Parameters (lead) | 242M |
| Runs with | transformers |
| Released | 2026-03-11 |
| Popularity | 553 downloads / month |
| Licence | Open weights |
About
针对维吾尔语语音识别微调的OpenAI Whisper Small模型。
pip install transformers torch soundfile numpy
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import soundfile as sf
import numpy as np
# 加载模型
model_name = "anke01/whisper-small-uyghur"
processor = WhisperProcessor.from_pretrained(model_name)
model = WhisperForConditionalGeneration.from_pretrained(model_name)
# 加载音频
waveform, sample_rate = sf.read("audio.wav", dtype='float32')
# 转为单声道
if len(waveform.shape) > 1:
waveform = np.mean(waveform, axis=1)
# 重采样到16kHz
if sample_rate != 16000:
old_len = len(waveform)
new_len = int(old_len * 16000 / sample_rate)
waveform = np.interp(
np.linspace(0, old_len - 1, new_len),
np.arange(old_len),
waveform
)
# 处理音频
inputs = processor(waveform, sampling_rate=16000, return_tensors="pt")
# 使用维吾尔语token生成
lang_token_id = processor.tokenizer.convert_tokens_to_ids("")
forced_decoder_ids = [
(1, lang_token_id),
(2, processor.tokenizer.convert_tokens_to_ids("")),
]
predicted_ids = model.generate(
inputs.input_features,
forced_decoder_ids=forced_decoder_ids
)
# 解码
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
print(transcription)
# 转录音频文件
python inference.py audio.wav
# 指定模型路径
python inference.py audio.wav ./model
# 在数据集上评估
python evaluate.py data/val.json
# 指定模型路径
python evaluate.py data/val.json ./model
# 只评估前100条
python evaluate.py data/val.json ./model 100
# 自动修复模型配置
python fix_model_config.py
本模型扩展了原始Whisper的词汇表:
.
├── model.safetensors # 模型权重 (925MB)
├── vocab.json # 分词器词汇表
├── tokenizer_config.json # 分词器配置
├── preprocessor_config.json # 音频预处理器配置
├── config.json # 模型配置
├── generation_config.json # 生成配置 (包含语言映射)
├── language_info.json # 语言元数据
├── inference.py # 推理脚本
├── evaluate.py # 评估脚本
├── fix_model_config.py # 配置修复脚本
└── README.md # 本文件
输入: thuyg20_00000_*.wav (8.30秒)
输出:
بىز نەچچە يىل تىرىشىش ئارقىلىق بۇ قاقاس يەرنى ئاخىرى مۇنبەت ئىتىزغا ئايلاندۇردۇق
中文翻译: "我们经过多年的努力,终于把这片荒地变成了肥沃的田地"
@misc{whisper-uyghur,
title={Whisper Small Fine-tuned for Uyghur},
author={Your Name},
year={2024},
publisher={Hugging Face}
}
与原始Whisper模型相同 (Apache 2.0)。
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys whisper-small-uyghur for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (whisper-small-uyghur 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="whisper-small-uyghur" -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.