Views
No views yet
| Dataset | WER | EOS Generation Rate |
|---|---|---|
| LibriSpeech dev-clean | 6.69% | 99.9% |
1# 1. Clone the repository
2git clone https://github.com/suryaumapathy2812/voxlm.git
3cd voxlm
4
5# 2. Install dependencies
6pip install -e .
7# Or: uv sync
8
9# 3. Download model
10pip install huggingface_hub
11python -c "from huggingface_hub import hf_hub_download; hf_hub_download('suryaumapathy2812/voxlm-2b', 'model.pt', local_dir='./models/voxlm-2b/')"1# 4. Run inference
2import torch
3import soundfile as sf
4from src.model import VoxLM
5
6# Load model
7checkpoint = torch.load("models/voxlm-2b/model.pt", map_location="cuda", weights_only=False)
8model = VoxLM(checkpoint["config"]).to("cuda")
9model.load_state_dict(checkpoint["model_state_dict"])
10model.eval()
11
12# Load audio (16kHz)
13audio, sr = sf.read("audio.wav")
14audio_tensor = torch.from_numpy(audio).float().to("cuda")
15
16# Transcribe
17with torch.no_grad():
18 result = model.transcribe(audio_tensor)
19
20print(result["text"])
21# Output: "hello world"
22
23print(result["words"])
24# Output: [
25# {"word": "hello", "start": 0.0, "end": 0.5, "confidence": 0.98},
26# {"word": "world", "start": 0.5, "end": 1.0, "confidence": 0.95}
27# ]1# After HuggingFace integration is complete:
2from transformers import AutoModel
3import torch
4import soundfile as sf
5
6# Load model directly from HuggingFace
7model = AutoModel.from_pretrained(
8 "suryaumapathy2812/voxlm-2b",
9 trust_remote_code=True
10).to("cuda")
11
12# Load audio and transcribe
13audio, sr = sf.read("audio.wav")
14result = model.generate(torch.from_numpy(audio).float().to("cuda"))
15
16print(result["text"])
17print(result["words"])Audio Input (16kHz)
│
▼
┌─────────────────┐
│ Whisper Encoder │ (frozen)
│ (244M params) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Audio Projection│ (trainable)
│ + Downsampling│
└────────┬────────┘
│
▼
┌─────────────────┐
│ Qwen2-1.5B LLM │ (LoRA adapters)
│ │
└────────┬────────┘
│
├──────────────────┐
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Text Output │ │ Alignment Module│
│ (transcription)│ │ (timestamps) │
└─────────────────┘ └─────────────────┘1@misc{voxlm2026,
2 title={VoxLM: Modular Speech-to-Text with LLM Intelligence},
3 author={Surya Umapathy},
4 year={2026},
5 url={https://github.com/suryaumapathy2812/voxlm}
6}