Instructions to use Chillarmo/DpirASR-ForcedAligner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Chillarmo/DpirASR-ForcedAligner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="Chillarmo/DpirASR-ForcedAligner")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForTokenClassification processor = AutoProcessor.from_pretrained("Chillarmo/DpirASR-ForcedAligner") model = AutoModelForTokenClassification.from_pretrained("Chillarmo/DpirASR-ForcedAligner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="Chillarmo/DpirASR-ForcedAligner")# pip install -U transformers accelerate
# Load model directly
from transformers import AutoProcessor, AutoModelForTokenClassification
processor = AutoProcessor.from_pretrained("Chillarmo/DpirASR-ForcedAligner")
model = AutoModelForTokenClassification.from_pretrained("Chillarmo/DpirASR-ForcedAligner", device_map="auto")DpirASR-ForcedAligner
DpirASR-ForcedAligner estimates word start and end times from 16 kHz mono audio and its transcript. It targets modern Eastern Armenian broadcast speech. The merged BF16 checkpoint uses Qwen's timestamp classifier with 80 ms classes. Base model
Evaluation
Both models aligned the same transcripts on 2,523 matched test clips from 28 held-out recordings (7.27 hours, 61,470 words). The table uses the standard Qwen timestamp decoder with smoothing and scores both boundaries of each word.
| Model | Mean start error | Mean end error | Mean boundary error | Boundaries within 100 ms | Words with both boundaries within 100 ms |
|---|---|---|---|---|---|
| DpirASR-ForcedAligner | 27.79 ms | 29.86 ms | 28.83 ms | 98.02% | 96.45% |
| Qwen3-ForcedAligner-0.6B-hf | 2,846.89 ms | 2,877.38 ms | 2,862.13 ms | 12.45% | 3.78% |
The score measures agreement with automatically generated timestamps from the word-level transcripts. The matched test set excludes 201 continuous clips whose transcripts could not be fully reconciled with the word-timing export. Raw and smoothed metrics
Usage
Load with Transformers 5.16.1 or later. Supply an Armenian transcript and leave the language hint unset to use the processor's whitespace-based word splitting. Use short clips of up to 30 seconds, the range used during fine-tuning.
import soundfile as sf
import torch
from transformers import AutoModelForTokenClassification, AutoProcessor
repo = "Chillarmo/DpirASR-ForcedAligner"
device = "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.bfloat16 if device == "cuda" and torch.cuda.is_bf16_supported() else torch.float32
processor = AutoProcessor.from_pretrained(repo)
model = AutoModelForTokenClassification.from_pretrained(repo, dtype=dtype).to(device).eval()
audio, sample_rate = sf.read("speech.wav", dtype="float32")
assert sample_rate == 16000 and audio.ndim == 1
inputs, words = processor.prepare_forced_aligner_inputs(
audio=audio, transcript="ิฒีกึีซ ึ
ึึ"
)
inputs = inputs.to(device, dtype)
with torch.inference_mode():
logits = model(**inputs).logits
alignment = processor.decode_forced_alignment(
logits, inputs["input_ids"], words, model.config.timestamp_token_id
)[0]
print(alignment)
The output contains text, start_time, and end_time for each word. Times are relative to the input clip and expressed in seconds.
Training
Fine-tuning used 23,359 continuous clips from 236 recordings with word-level transcripts covering 504,365 timestamped words. The run used rank-16 LoRA in the audio and language attention layers and trained the audio-to-text projector and timestamp classifier. The released checkpoint had the lowest raw boundary mean absolute error on 926 validation clips from 12 separate recordings. It was saved at step 1,095 after three epochs.
License
The weights are a fine-tuned derivative of Qwen3-ForcedAligner-0.6B-hf under Apache 2.0. License text
- Downloads last month
- 9
Model tree for Chillarmo/DpirASR-ForcedAligner
Base model
Qwen/Qwen3-ForcedAligner-0.6B-hf
# Gated model: Login with a HF token with gated access permission hf auth login