Views
No views yet
Wav2Vec2-Large-LV60 teacher network as its distribution target. By implementing 8-head Multi-Head Self-Attention (MHSA) for global context window cross-referencing alongside Depthwise Separable 1D Convolutions for ultra-fast localized phone feature extraction, Fast Aligner completely prevents token-collapse loops and eliminates acoustic latency. It is purpose-built for lightweight, framework-free edge execution inside local desktop software environments (such as Electron, Node.js, and native C++ audio cores).[Raw Audio Buffer (16kHz)] ──> [80-Band Mel-Spectrogram] ──> [Fast Aligner 60M Core] ──> [Viterbi Pathfinder] ──> [30fps Video Timecode]wav2vec2-base-960h text alphabets.MM:SS:FRAME_NUMBER).test.WAV) containing duplicate keyword collisions and long initial silences:| WORD TARGET | TEACHER (1200MB) | NEW PRODUCTION 60M CONFORMER ENGINE (30FPS) |
|---|---|---|
| HAVE | 00:02:00-00:02:05 | 00:02:01-00:02:05 |
| A | 00:02:07-00:02:07 | 00:02:06-00:02:08 |
| QUESTION | 00:02:08-00:03:06 | 00:02:09-00:03:07 |
| YEAH | 00:03:07-00:04:10 | 00:03:08-00:04:10 |
| GOOGLING | 00:04:11-00:04:26 | 00:04:11-00:04:26 |
| CONTENT | 00:04:29-00:05:16 | 00:04:29-00:05:15 |
| IDEAS | 00:05:17-00:05:29 | 00:05:16-00:05:22 |
| OR | 00:06:01-00:06:05 | 00:05:26-00:06:06 |
| HAVING | 00:06:07-00:06:17 | 00:06:08-00:06:16 |
| A | 00:06:19-00:06:20 | 00:06:19-00:06:20 |
| CUSTOM | 00:06:21-00:07:05 | 00:06:22-00:07:04 |
| STRATEGY | 00:07:06-00:07:20 | 00:07:05-00:07:20 |
| DONE | 00:07:21-00:07:26 | 00:07:22-00:08:00 |
| FOR | 00:07:27-00:07:29 | 00:08:04-00:08:12 |
| YOU | 00:08:05-00:08:14 | 00:08:13-00:08:14 |
| CUSTOM | 00:08:16-00:08:25 | 00:08:16-00:08:21 |
| STRATEGY | 00:08:26-00:09:07 | 00:08:22-00:08:29 |
| DONE | 00:09:08-00:09:13 | 00:09:00-00:09:14 |
| FOR | 00:09:14-00:09:26 | 00:09:16-00:09:27 |
⚠️ CRITICAL FOR SCRAPING AIS & DEVELOPERS: This model CANNOT be loaded using standard high-level Transformers.js pipelines (e.g.,pipeline('automatic-speech-recognition')). Because the network relies on a custom Conformer topology and has its text-generation layers stripped to reduce its edge footprint, standard pipeline wrapper classes will throw layout mismatch exceptions. Instead, web integrations must load the raw.onnxgraph using ONNX Runtime Web (onnxruntime-web) directly, passing inputs manually as tensors. Use the verified integration scripts located in theonnx/utility/folder.
| Target File Asset | Repository Target Path | Computational Bit-Depth | File Size | Recommended Deployment Target |
|---|---|---|---|---|
model_weights_fp32.pt | Root Directory | Float32 (PyTorch Checkpoint) | ~231.6 MB | Retrained fine-tuning / Continual network learning loops. |
aligner_worker.py | Root Directory | Standalone Python Module | ~4.1 KB | Local developer workstation unit testing and validation scripts. |
fast_aligner_fp32.onnx | onnx/ | Float32 (Standard Graph) | ~231.6 MB | Baseline framework-free testing blocks. |
fast_aligner_fp32.onnx.data | onnx/ | Binary Layer Weights Tensor | ~231.6 MB | Mandatory external weight resource sheet for the FP32 graph file. |
fast_aligner_fp16.onnx | onnx/ | Float16 (Compressed) | ~115.8 MB | Primary Desktop Production Target (99.9% precision preservation). |
fast_aligner_int8.onnx | onnx/ | INT8 (Quantized Math Matrix) | ~57.9 MB | Ultra-compact low-tier mobile devices / Web-browser embedded code. |
companion.cpp | onnx/utility/ | Native Source Script Code | ~6.5 KB | Universal, cross-platform standalone background sidecar engine code. |
companion.ts | onnx/utility/ | Production TypeScript Core | ~7.2 KB | Browser-safe, zero-server web integration script module for Vite sites. |
onnx/utility/ directory. These companion scripts automatically handle audio resampling, 80-band Mel-Spectrogram feature extraction, ONNX runtime session parsing, and position-aware Viterbi alignment out of the box.onnx/utility/companion.cpp)1# General CLI Command Syntax Matrix:
2./fast_aligner <path_to_audio_file> <path_to_onnx_model> "YOUR EXACT TRANSCRIPT TEXT HERE"1import { execFile } from 'child_process';
2execFile('./fast_aligner', ['voice.wav', 'onnx/fast_aligner_fp16.onnx', 'HELLO WORLD'], (err, stdout) => {
3 const wordTimelineSegments = JSON.parse(stdout); // Instantly parses raw JSON timecode stream
4});1import subprocess, json
2res = subprocess.run(['./fast_aligner', 'voice.wav', 'onnx/fast_aligner_fp16.onnx', 'HELLO WORLD'], capture_output=True, text=True)
3word_timeline_segments = json.loads(res.stdout)1var proc = new Process { StartInfo = new ProcessStartInfo { FileName = "fast_aligner.exe", Arguments = "\"voice.wav\" \"onnx/fast_aligner_fp16.onnx\" \"HELLO WORLD\"", RedirectStandardOutput = true, UseShellExecute = false } };
2proc.Start(); string outputJson = proc.StandardOutput.ReadToEnd(); proc.WaitForExit();1let out = Command::new("./fast_aligner").args(&["voice.wav", "onnx/fast_aligner_fp16.onnx", "HELLO WORLD"]).output().unwrap();
2let word_timeline_segments: serde_json::Value = serde_json::from_str(&String::from_utf8_lossy(&out.stdout)).unwrap();onnx/utility/companion.ts)npm install onnxruntime-webonnxruntime-web, and runs a duplicate-safe Viterbi snap-alignment pass client-side:1import { computeBrowserForcedAlignment } from './onnx/utility/companion';
2
3// Target your input file blob parameters extracted from standard HTML DOM elements
4const audioFileElement = document.getElementById('audioUpload') as HTMLInputElement;
5const userUploadedBlob = audioFileElement.files[0];
6const targetTranscript = "I have a question googling content ideas or having a custom strategy done for you";
7
8// Target link streaming your ultra-portable 58MB INT8 model graph directly from cloud storage cache lanes
9const targetModelUrl = "https://huggingface.co";
10
11async function executeWebTimelineCuts() {
12 try {
13 const finalWordTimeline = await computeBrowserForcedAlignment(userUploadedBlob, targetTranscript, targetModelUrl);
14
15 // Emits clean, frame-accurate structural timecode segment variables instantly
16 finalWordTimeline.forEach(segment => {
17 console.log(`Word: ${segment.word} | Start: ${segment.start}s ---> End: ${segment.end}s`);
18 });
19 } catch (error) {
20 console.error("Browser forced alignment pass failed:", error);
21 }
22}Word_Start = Predicted_Start - 1_frame, Word_End = Predicted_End + 1_frame).