॥ वाचं धेनुमुपासीत ॥

Vāgdhenu In-Browser

A 100% client-side, vṛtta-aware Sanskrit śloka-to-chant neural synthesis engine. Runs a 22-block Flow-Matching DiT, Fourier-Hann Vocos vocoder, and Pāṇinian prosody analyzer directly on your device via WebGPU and WebAssembly SIMD—with zero server calls.

In-Browser Śloka Recitation Studio

Synthesized 100% locally in your browser tab from Devanagari, Kannada, Telugu, Malayalam, Tamil, or Bengali.

Script: Devanagari
Canonical Sample Ślokas
Client-Side Neural Pipeline Default: ONNX WebGPU (sanskrit-tts-onnx) · CPU Worker: sanskrit-tts-wasm
Bank: 2.84 MB FP16 Conditioner: 18.8 MB ONNX FP16-Cast 22-Block DiT: 184 MB ONNX WebGPU Vocos: 55.6 MB Fourier-Hann
100% In-Browser WebGPU + WASM SIMD ready · click Chant Śloka to run locally. 0.0s

Client-Side Pāṇinian Scansion

Zero-latency Guru (ˉ) and Laghu (˘) syllable weight analysis computed in JavaScript.

32 syllables
Detected Vṛtta
anuṣṭubh
Hemistich Akṣaras
16 + 16 akṣaras

In-Browser Kannada Orthographic Routing

Prevents schwa-deletion while preserving jihvāmūlīya, upadhmānīya, and retroflex clusters before ONNX tokenization.

ONNX Input

Engineered for 100% In-Browser Execution

How a 1.8 GB Sanskrit Flow-Matching TTS pipeline was baked into a 237 MB WebGPU and WebAssembly runtime with 0.9999 backbone cosine fidelity.

In-Browser Reference Bank 2.45 MB FP16

Pre-Baked Mel Reference Bank Across 18 Classical Vṛttas

Instead of running server-side audio slicing and STFT extraction at runtime, all 18 classical meter templates and 3 alliteration repeat-primes are pre-baked into a 2.45 MB IEEE-754 Float16 binary (baked_bank.bin) decoded directly into Float32Array tensors in JavaScript.

anuṣṭubh vasantatilakā śārdūlavikrīḍita sragdharā mālinī upajāti vaṃśastha drutavilambita
WebGPU DiT Backbone 86.8% Smaller

Rank-32 SVD AdaLN & Head-0 Split-Half RoPE

Factoring all 23 time-conditioning projections onto the 32-D trajectory of silu(time_embed(t)) eliminates 137.5M parameters. Combined with per-column symmetric INT8 storage, fused QKV projections, and exact Head-0 split-half RoPE, the 22-block DiT step achieves 0.99992 cosine similarity inside Chrome WebGPU.

JavaScript Prosody Engine 0.2 ms / Verse

Pure-JS Pāṇinian Scansion & Sandhi

vagdhenu-text.js implements zero-dependency multi-script detection, SLP1 normalization, Guru/Laghu syllable weight tagging, 18-vṛtta pattern matching, visarga sandhi, satva assimilation, and Kannada orthographic routing entirely on the client thread.

Complex64-Free Vocoder 0.9977 WAV Cosine Sim

Fourier-Hann ConvTranspose1d Vocos & Acoustic Gate

WebGPU and ONNX lack native Complex64 inverse STFT ops. We reformulate torch.istft as an exact 1026-channel Fourier-Hann ConvTranspose1d basis paired with an unquantized FP32 instantaneous phase head, followed by an in-browser fricative/halant RMS gate and 24 kHz PCM WAV encoder.

In-Browser ONNX Artifact Breakdown

Hosted at huggingface.co/gnumanth/sanskrit-tts-onnx and cached locally in your browser's Cache API for offline-capable, zero-server Sanskrit recitation.

vagdhenu_cond_q8.onnx · 34 MB

1. Static Conditioner (Run 1× per Hemistich)

Hoists the 4-block ConvNeXtV2 text encoder, reference mel projection (W_c @ cond_mel + b), text projection (W_t @ emb), and split-half rotary position embeddings outside the ODE loop so they execute only once per hemistich instead of at every flow step.

vagdhenu_dit_step_q8.onnx · 192 MB

2. 22-Block WebGPU W8 DiT Step

Executes sway-sampled Rectified Flow ODE integration with Adaptive Classifier-Free Guidance directly on the GPU via WebGPU compute shaders (with automatic fallback to WebAssembly SIMD). Uses single-node FastGelu, static head reshapes, and Rank-32 SVD AdaLN.

3. Fourier-Hann Vocos Vocoder (vagdhenu_vocos_q8.onnx · 56 MB) ConvNeXt backbone + exact FP32 log-magnitude/phase head + 1026-bin Fourier-Hann ConvTranspose1d synthesis Download from Hugging Face →
4. Pre-Baked Prosody Bank (baked_bank.bin · 2.84 MB) 18 classical vṛtta mel templates + 3 alliteration primes + 1,039-token Kannada/Sanskrit phoneme vocabulary Browse Model Repository →