Model reference · open weights
wav2vec2-sanskr-stt is an open-weight audio or speech model from addy88. 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 | addy88 |
|---|---|
| Type | Audio & music |
| Task | Speech→text |
| Runs with | transformers |
| Released | 2022-03-02 |
| Popularity | 589 downloads / month |
| Licence | Unknown |
About
The model can be used directly (without a language model) as follows:
import soundfile as sf
import torch
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import argparse
def parse_transcription(wav_file):
# load pretrained model
processor = Wav2Vec2Processor.from_pretrained("addy88/wav2vec2-sanskrit-stt")
model = Wav2Vec2ForCTC.from_pretrained("addy88/wav2vec2-sanskrit-stt")
# load audio
audio_input, sample_rate = sf.read(wav_file)
# pad input values and return pt tensor
input_values = processor(audio_input, sampling_rate=sample_rate, return_tensors="pt").input_values
# INFERENCE
# retrieve logits & take argmax
logits = model(input_values).logits
predicted_ids = torch.argmax(logits, dim=-1)
# transcribe
transcription = processor.decode(predicted_ids[0], skip_special_tokens=True)
print(transcription)
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys wav2vec2-sanskr-stt for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (wav2vec2-sanskr-stt 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-sanskr-stt" -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.