The Comprehensive All-in-One Gujarati Language & AI Intelligence Suite.
An open-source ecosystem bridging classical Gujarati typography, dynamic stroke animations, real-time handwriting recognition, native audio generation, Speech-to-Text (STT), Text-to-Speech (TTS), and AI grammar intelligence.
🌐 Live Interactive Apps:
- 🖋️ Kano Stroke Animator & Audio: https://gajjartejas.github.io/KanoAI/
- ✍️ Kano Handwriting Recognition & Practice Suite: https://gajjartejas.github.io/KanoAI/handwriting/
- 🗣️ Kano Gujarati Voice (TTS) Studio: https://gajjartejas.github.io/KanoAI/#tts
- 📊 Kano Gujarati TTS Model Comparison (3-Column Matrix): https://gajjartejas.github.io/KanoAI/tts-comparison/
- 📸 Kano Gujarati OCR & Vision Studio: https://gajjartejas.github.io/KanoAI/#ocr
| 🖋️ Stroke Animator & Kano Audio Suite | ✍️ Handwriting Practice Suite | 🗣️ Gujarati Text-to-Speech (TTS) Studio | 📸 Gujarati OCR & Vision Studio |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
Run the one-click launcher to start the Python Unified Backend API Server (OCR + TTS on port 8000) and the Local Web Studio (port 8085), perform health checks, and automatically open the suite in your default browser:
# Using Bash (macOS / Linux):
./start_all.sh
# Or using Python (macOS / Windows / Linux):
python3 start_all.pyOptions & Flags:
./start_all.sh --tab tts• Open directly to the Text-to-Speech (TTS) Studio (#tts)./start_all.sh --tab ocr• Open directly to the OCR & Vision Studio (#ocr)./start_all.sh --tab handwriting• Open directly to the Handwriting Suite (/handwriting/)./start_all.sh --no-browser• Start servers in background without opening browser./start_all.sh --api-port 8000 --web-port 8085• Custom ports
| Module | Status | Description |
|---|---|---|
| 🖋️ Kano Trace | ✅ Live | Stroke-by-stroke animation, EDT centerline extraction, and 565-character stroke catalog. |
| ✍️ Kano Handwriting | ✅ Live | Real-time offline recognition combining Sakoe-Chiba DTW + in-memory Tiny CNN. |
| 🔊 Kano Audio | ✅ Live | Compressed, crystal-clear native speech pronunciations for all 565 characters. |
| 🗣️ Kano Voice (TTS) | ✅ Live | State-of-the-art neural TTS with AI4Bharat IndicF5 & Indic-TTS / Bodhan Indic-Speak. |
| 📸 Kano Vision (OCR) | ✅ Live | Multi-engine Gujarati OCR (Bhashini IndicPhotoOCR, Gujarati TrOCR, GujaratiHCR) with voice playback bridge. |
| 🎙️ Kano Listen (STT) | 📋 Planned | Offline & low-latency Gujarati Speech-to-Text acoustic modeling. |
| 🧠 Kano Grammar (AI) | 📋 Planned | LLM-assisted Gujarati spell-checker, grammar analysis, sandhi/samasa parser, and NLP toolkits. |
| ⚡ Kano API | ✅ Live | Lightweight REST / JSON microservices for characters, strokes, phonemes, and audio synthesis. |
KanoAI/
├── .agents/ # Antigravity AI agent skills & custom workflows (/update-markdown)
├── handwriting/ # Real-Time Gujarati Handwriting Recognition & Practice Workspace
│ ├── src/ # Canvas, Guided Tracing, Quiz, Free Draw, Hybrid DTW + Tiny CNN
│ ├── __tests__/ # Automated test suites (30 tests)
│ ├── scripts/ # Template extraction & model generation scripts
│ ├── package.json # TypeScript, React Native Web, Expo, and Jest runners
│ └── README.md # Full technical spec & architecture documentation
├── node/ # Node.js resource generation workspace
│ ├── package.json # Dependencies (text-to-svg, node-fetch)
│ ├── index.js # Static SVG, CSV, and TTS audio generator
│ └── README.md # Node.js documentation and usage instructions
├── python/ # Python workspace
│ ├── setup_venv.sh # Industry-standard virtual environment setup script
│ ├── README.md # Python workspace overview & venv instructions
│ ├── ocr/ # Multi-Engine Gujarati OCR Studio (IndicPhotoOCR, TrOCR, GujaratiHCR)
│ ├── tts/ # Neural Gujarati Voice Studio (IndicF5 & Indic-TTS)
│ ├── tests/ # Comprehensive unit tests for OCR, TTS, APIs & services
│ └── char_stroke_generation/ # Dedicated character stroke generation package
│ ├── stroke_generator/ # Core library (Bézier, EDT, HarfBuzz, IoU matching)
│ ├── scripts/ # Standalone CLI runners
│ ├── tests/ # Automated unit tests
│ ├── pyproject.toml # PEP 621 packaging
│ ├── requirements.txt # Pip dependencies
│ └── README.md # Technical documentation & math formulations
├── docs/ # Live GitHub Pages interactive frontend & Kano audio suite
│ ├── index.html # Semantic responsive single-page web application
│ ├── css/ # Modular styling (main, stage comparison, ocr, character grid)
│ ├── js/ # Stage renderer, Kano audio player, OCR studio, app coordinator
│ ├── assets/ # Full 565-character SVG catalog, OCR sample documents & previews
│ └── handwriting/ # Production web build for the Handwriting Recognition Suite
├── scripts/ # Launchers (start_all.sh/py), test runners (run_tests.sh/py) & asset tools
├── start_all.sh # One-click suite launcher (Bash)
├── start_all.py # One-click suite launcher (Python)
├── fonts/ # Shared TrueType/OpenType Gujarati fonts
├── resources/ # Shared JSON definitions & raw datasets (Kakko, Barakhadi, Numerals)
├── interpolate-svg/ # Manual reference SVG stroke templates
├── output/ # Generated SVG artifacts & preview catalogs (.gitignored)
└── .github/workflows/ # GitHub Actions automated GitHub Pages deployment workflow
🔗 Live Production Demo: https://gajjartejas.github.io/KanoAI/
The live web application provides an interactive stroke animator and audio player:
- All 565 Gujarati Characters: Complete Kakko (45), full Barakhadi (420 across 35 consonants), and Numerals 0–100 (101).
- Normalized 1:1 Stage Sizing: Explicit
viewBoxcoordinate normalization ensuring Reference (Light) and Auto-Generated (Bold) comparison cards scale with equal proportions and perfect centering. - Dedicated Settings Panel: Right-side desktop dock with quick playback controls, layer toggles, speed adjustments, and keyboard shortcuts.
- Dynamic Stroke Width Options: Interactive slider (1px to 10px) with live preset pills (
2px,3.5px,5px,7px) modifying both stages in real-time. - Kano Audio Pronunciations: Speech pronunciations for all 565 characters, compressed via
ffmpegto high-efficiency MP3s, featuring auto-play on selection, dedicated🔊 Pronouncebutton, and persistentSound: ON/OFFtoggle. - Dark / Light Theme Toggle: Top-right switch with Sun/Moon icons, custom HSL color palettes, and
localStoragememory. - Mobile Responsive Design: Clean side-by-side stages, compact slider grids, and touch-optimized character targets on mobile viewports.
- Zero-Click GitHub Pages Deployment: Fully automated via
.github/workflows/deploy-pages.yml.
| Dark Theme (Default) | Light Theme |
|---|---|
![]() |
![]() |
🔗 Live Handwriting Web App: https://gajjartejas.github.io/KanoAI/handwriting/
A complete handwriting recognition and practice suite featuring:
- Guided Practice: Step-by-step Gujarati character tracing with directional hints, sequential stroke bubbles, and instant feedback.
- Animated Player: Interactive stroke-by-stroke playback of all 565 characters with speed controls and printable worksheet generator.
- Quiz Game: Gamified learning pairing Gujarati vocabulary, native audio pronunciation, and interactive drawing challenges.
- Free Drawing & Recognition: Multi-stroke canvas powered by a Hybrid Recognition Engine combining Sakoe-Chiba Dynamic Time Warping (DTW) and an in-memory Tiny CNN (Conv2D/MaxPool/Dense) classifier.
- Accuracy Benchmarks: Automated performance testing verifying sub-20ms latency and high recognition accuracy across characters.
cd handwriting
npm install
npm test # Run all 7 Jest test suites (30 tests)
npm run web # Launch local development server
npm run build:web # Export production bundle to docs/handwriting👉 See Handwriting Documentation (handwriting/README.md) for architecture details.
State-of-the-Art Gujarati Neural Voice Generation integrating 100% offline local models and AI4Bharat architectures:
- Meta MMS-TTS (
facebook/mms-tts-guj) ★ 100% Offline & Local:- Architecture: End-to-end Variational Inference with Adversarial Learning (VITS, 16,000 Hz).
- Execution: 100% offline and local inference on Apple Silicon MPS, NVIDIA CUDA, or CPU with zero cloud rate limits.
- Capabilities: High-fidelity isolated consonant, syllable, Barakhadi, and numeral synthesis with automated verbalization (
૧→એક,૧૦→દસ).
- Piper TTS (
piper-tts) ★ Ultra-Fast ONNX Runtime:- Architecture: Neural text-to-speech running locally on ONNX Runtime with sub-100ms inference on low-resource CPUs.
- Models: Native Hindi / Indic voices (
Rohan,Pratham,Priyamvadaviarhasspy/piper-voices) and community Gujarati checkpoint (Arjun4707/piper-gujarati-maletrained on AI4Bharat dataset). - Capabilities: Ultra-lightweight CPU execution, numeral verbalization, and seamless cross-venv bridge.
- Parler-TTS Indic (
ai4bharat/indic-parler-tts) ★ Prompt-Guided Expressive Audio:- Architecture: Natural language audio codec synthesis (24,000 Hz) guided by descriptive English prompts.
- Presets: Warm & Gentle Female, Expressive Storyteller, Authoritative Broadcaster Male, Intimate Whisper, or custom freeform prompts.
- Endpoints: Local Engine (port 7861), Cloud HuggingFace Spaces ZeroGPU, or Custom Endpoint URL.
- Browser Native Web Speech API ★ Zero-Latency Client-Side:
- Architecture: W3C
SpeechSynthesishardware-accelerated synthesis executing directly inside the client's browser. - Capabilities: Zero server latency (0ms), dynamic pitch/rate controls, automatically detects OS Gujarati (
gu-IN) voices (Apple & Google).
- Architecture: W3C
- Bhashini Official Neural TTS (Digital India / IIT Madras) ★ National Benchmark:
- Architecture: Official Digital India Bhashini Mission benchmark neural models for formal academic and news diction.
- Voice Profiles: Bhashini Official Female (Priyamvada neural model fallback) and Bhashini Official Male.
- Endpoints: 100% Local Offline Engine (no API key needed), Official ULCA Cloud API (
dhruva-api.bhashini.gov.in), or Custom URL.
- Google Cloud Neural2 / Wavenet (
gu-IN) ★ Studio Quality Commercial Neural:- Architecture: Google DeepMind Wavenet, Standard, and Neural2 models (
gu-IN-Wavenet-A/B,gu-IN-Neural2-A/B). - Endpoints: Official Google Cloud REST API with Linear16 audio, Local Offline Neural Fallback, or Custom Proxy URL.
- Architecture: Google DeepMind Wavenet, Standard, and Neural2 models (
- AI4Bharat IndicF5 (GitHub / HuggingFace):
- Architecture: Flow-matching diffusion-style voice synthesis (24,000 Hz).
- Endpoints: Local Server (port 7865), Cloud Hugging Face Space, or Custom Endpoint URL.
- AI4Bharat Indic-TTS / Bodhan-AI Indic-Speak (GitHub / HuggingFace):
- Architecture: Multi-speaker fast neural acoustic model (44,100 Hz).
- Endpoints: Local Server (port 7861), Cloud Hugging Face Space, or Custom Endpoint URL.
- eSpeak-NG (Python Wrapper & Formant Engine) ★ Lightweight Phoneme Debugger:
- Architecture: Formant-based synthesis, lightweight (<10 MB), zero neural weights.
- Languages: Native
gu(Gujarati) andhi(Hindi) phoneme tables. - Capabilities: Instant offline phonetic IPA and consonant debugging (swars, vyanjans, matras, virama) with pure acoustic formant synthesis.
# 1. Start the lightweight TTS HTTP API server (port 8000)
.venv/bin/python3 python/tts/server.py --port 8000
# 2. Open the web studio in docs/ or via local server
python3 -m http.server 8085 --directory docs
# Navigate to: http://localhost:8085/#ttsDedicated offline batch pronunciation generator for Kakko, Barakhadi series, and numerals with optional FFmpeg MP3 compression:
# 1. Run pronunciation benchmark across sample isolated characters & numerals:
.venv/bin/python3 python/audio_generation/generate_tts_local.py --benchmark
# 2. Synthesize custom Gujarati text directly to MP3:
.venv/bin/python3 python/audio_generation/generate_tts_local.py --text "કક્કો" --output out.mp3 --format mp3
# 3. Batch generate isolated Kakko consonants (WAV or MP3):
.venv/bin/python3 python/audio_generation/generate_tts_local.py --category kakko --output-dir output/tts/kakko --format mp3
# 4. Batch generate numerals (૧ to ૧૦૦):
.venv/bin/python3 python/audio_generation/generate_tts_local.py --category numerals --output-dir output/tts/numerals --format mp3# Synthesize with Meta MMS-TTS (Offline VITS)
.venv/bin/python3 python/tts/cli.py --engine mms_tts --text "નમસ્તે KanoAI" --output output/tts/mms.wav
# Synthesize with Piper TTS (Rohan - ONNX Runtime)
.venv/bin/python3 python/tts/cli.py --engine piper_tts --voice rohan --text "નમસ્તે KanoAI" --output output/tts/piper.wav
# Synthesize and debug phonemes with eSpeak-NG (Gujarati)
.venv/bin/python3 python/tts/cli.py --engine espeak_ng --lang gu --text "નમસ્તે KanoAI" --output output/tts/espeak.wav
# Synthesize with Indic-TTS (Dhara)
.venv/bin/python3 python/tts/cli.py --engine indic_tts --text "નમસ્તે KanoAI" --output output/tts/dhara.wav
# Synthesize with IndicF5
.venv/bin/python3 python/tts/cli.py --engine indic_f5 --text "નમસ્તે KanoAI" --output output/tts/f5.wav
# Multi-engine side-by-side comparison across all 5 engines
.venv/bin/python3 python/tts/cli.py --compare --text "ગુજરાતી ભાષા ખૂબ જ સુંદર છે."
# Run automated test suite
.venv/bin/python3 python/tts/cli.py --testMulti-Engine Gujarati Optical Character Recognition (OCR) covering printed literature, official scanned certificates, camera scene text / signboards, and handwritten notebook pages.
- Bhashini-IITJ IndicPhotoOCR (GitHub / HuggingFace Space):
- Architecture: DBNet Text Detector + Indic Multilingual Sequence Recognition.
- Best For: Natural scene text, street signs, posters, and full page document localization with bounding box coordinates.
- Gujarati TrOCR (HuggingFace):
- Architecture: Vision Transformer (TrOCR) encoder-decoder trained on Gujarati typography and conjuncts.
- Best For: Scanned books and printed literature (96.2% exact word accuracy, 1.35% CER).
- GujaratiHCR Research Pipeline:
- Architecture: Adaptive binarization, horizontal/vertical projection profiling for line/word segmentation, contour isolation, and CNN-LSTM recognition.
- Best For: Cursive Gujarati handwriting, ruled notebook pages, and individual handwritten characters.
# 1. Start the unified OCR & TTS HTTP API server (port 8000)
.venv/bin/python3 python/ocr/server.py --port 8000
# 2. Open the web studio in docs/ or via local server
python3 -m http.server 8085 --directory docs
# Navigate to: http://localhost:8085/#ocr# Recognize scene photo or document with Bhashini IndicPhotoOCR
.venv/bin/python3 python/ocr/cli.py --image docs/assets/ocr_samples/sample_1_printed_book.png --engine indic_photo_ocr
# Recognize printed document with Gujarati TrOCR
.venv/bin/python3 python/ocr/cli.py --image docs/assets/ocr_samples/sample_4_official_doc.png --engine gujarati_trocr
# Run Handwriting HCR line segmentation
.venv/bin/python3 python/ocr/cli.py --image docs/assets/ocr_samples/sample_3_handwritten_note.png --engine gujarati_hcr
# Compare all 3 OCR engines side-by-side
.venv/bin/python3 python/ocr/cli.py --image docs/assets/ocr_samples/sample_1_printed_book.png --compare
# Run OCR automated self-test
.venv/bin/python3 python/ocr/cli.py --test👉 See OCR Documentation (python/ocr/README.md) for full API specifications.
The KanoAI suite includes a comprehensive Python unit test suite verifying OCR, TTS, API request handlers, image segmentation, and system launchers:
# Run using the automated shell test runner (macOS / Linux):
./scripts/run_tests.sh
# Or run using the cross-platform Python runner:
python3 scripts/run_tests.py
# Or directly with Python standard library unittest:
PYTHONPATH=python python3 -m unittest discover -s python/tests -p "test_*.py" -v| Component | Test Module | Description |
|---|---|---|
| 📸 OCR Service Coordinator | test_ocr_service.py |
Multi-engine routing (indic_photo_ocr, gujarati_trocr, gujarati_hcr), automatic fallback chain, sample catalog schema, comparison mode. |
| ✍️ GujaratiHCR Segmentation | test_ocr_hcr.py |
Grayscale & Otsu binarization, horizontal/vertical projection slicing, normalized bounding box coordinates (norm_x, norm_y, norm_w, norm_h), network timeout fallback. |
| 📖 Gujarati TrOCR | test_ocr_trocr.py |
Multi-line document contour slicing, input formats (PIL, NumPy, base64 data URIs, files), Hugging Face router & local server mocks. |
| ⚡ OCR Server API | test_ocr_server.py |
HTTP microservice endpoints (/api/health, /api/ocr/samples, /api/ocr/recognize, /api/ocr/compare), CORS preflight OPTIONS, 400 Bad Request handling. |
| 🗣️ TTS Service Coordinator | test_tts_service.py |
Unified preset catalogue, dual-engine voice routing (indic_f5, indic_tts), side-by-side comparison synthesis, speaker registry. |
| 🎙️ Neural TTS Engines | test_tts_engines.py |
IndicF5Engine and IndicTTSEngine parameter validations, empty input assertions, base64 audio payload encoding, speaker profiles (Dhara, Parth). |
| ⚡ TTS Server API | test_tts_server.py |
HTTP microservice endpoints (/api/health, /api/tts/voices, /api/tts/synthesize, /api/tts/presets), CORS headers, malformed payload recovery. |
| 🚀 System Launchers | test_launcher.py |
Cross-platform port availability check (is_port_in_use), health check wait loop (wait_for_url), repository root path resolution. |
Used for rendering standard glyph SVGs, CSV matrices, and Google Wavenet audio files.
cd node
npm install
node index.js👉 See Node.js Documentation (node/README.md) for details.
An analytical geometry and Euclidean Distance Transform (EDT) pipeline to automatically extract medial centerline strokes from Gujarati fonts for the Kano React Native educational app.
# 1. Run automated environment setup (creates .venv & installs dependencies)
./python/setup_venv.sh
# 2. Activate virtual environment
source .venv/bin/activate
# 3. Run automated unit tests
PYTHONPATH=python/char_stroke_generation python -m unittest discover -s python/char_stroke_generation/tests -t python/char_stroke_generation
# 4. Generate 56 showcase samples and launch interactive viewer
python python/char_stroke_generation/scripts/build_samples.py
python python/char_stroke_generation/scripts/build_viewer.py --serve 8765👉 See Python Workspace (python/README.md) and Stroke Generation Guide (python/char_stroke_generation/README.md) for details.
The KanoAI suite catalogs and interactively supports 565 total characters:
- Kakko (45): Complete Gujarati vowels (સ્વર) and consonants (વ્યંજન).
- Barakhadi (420): Comprehensive matra combinations across 35 consonants.
- Numerals (101): Gujarati digits and numbers
૦to૧૦૦(0–100) with complete transliterations and names.
Full structured JSON datasets and definitions are located in resources/:
All characters can be interactively browsed, animated, pronounced, and practiced in the Live Suite.
- Kano Trace: 565-character stroke animation & analytical EDT centerline extraction.
- Kano Handwriting: Dual DTW + Tiny CNN offline recognition engine (<20ms latency).
- Kano Voice (TTS): Neural Gujarati speech synthesis model (AI4Bharat IndicF5 & Indic-TTS / Bodhan-AI Indic-Speak) with smooth 60fps waveform sync.
- Kano Vision (OCR): Multi-engine Gujarati OCR studio (Bhashini-IITJ IndicPhotoOCR, Gujarati TrOCR, GujaratiHCR) with voice playback bridge.
- Kano Listen (STT): Offline Speech-to-Text engine optimized for regional accents.
- Kano Grammar AI: Contextual spell-checker, Sandhi/Samasa decomposition, and morphological analysis.
- Kano Cloud API: Developer REST/GraphQL endpoints for character stroke vectors, phonetics, and datasets.
KanoAI proudly stands on the shoulders of the open-source and scientific research communities. We gratefully acknowledge the following projects, models, datasets, and libraries:
- Meta MMS-TTS (Meta AI Research): Scaling Speech Technology to 1,000+ languages; Variational Inference with Adversarial Learning (VITS) Gujarati neural speech checkpoint (
facebook/mms-tts-guj). - Piper TTS (Rhasspy / Michael Hansen & community): Fast, local neural text-to-speech engine running on ONNX Runtime (Hugging Face Voices).
- Arjun4707/piper-gujarati-male: Community Gujarati Piper model trained on the AI4Bharat dataset.
- Digital India Bhashini Mission / IIT Madras: National Language Translation Mission (NLTM) official benchmark neural text-to-speech and Dhruva ULCA inference pipelines.
- Google Cloud Text-to-Speech: Google DeepMind WaveNet & Neural2 commercial neural speech synthesis models for Gujarati (
gu-IN). - AI4Bharat Parler-TTS Indic (IIT Madras & AI4Bharat): Natural language prompt-guided expressive text-to-speech for Indian languages.
- AI4Bharat IndicF5 (IIT Madras & AI4Bharat): Reference-conditioned Flow-Matching Speech Synthesis for Indian languages (Hugging Face Space).
- AI4Bharat Indic-TTS (IIT Madras & AI4Bharat): Multi-speaker neural text-to-speech acoustic models for Indian languages (Hugging Face).
- Bodhan AI (Indic-Speak): Natural Gujarati female (
Dhara) and male (Parth) neural speaker profiles. - eSpeak-NG: Multi-lingual software speech synthesizer with zero neural weights, formant acoustic modeling, and native Gujarati (
gu) & Hindi (hi) phoneme tables. - W3C Web Speech API: Client-side device-native hardware speech synthesis specification for zero-latency in-browser vocalization.
- Bhashini-IITJ IndicPhotoOCR (Digital India Bhashini & IIT Jodhpur): Scene text detection (DBNet) and multilingual Indic sequence recognition (Hugging Face Space).
- Gujarati TrOCR by Umang Chaudhari: Vision Transformer (ViT + RoBERTa) encoder-decoder fine-tuned specifically for Gujarati text and conjuncts.
- Microsoft TrOCR (Microsoft Research): Transformer-based Optical Character Recognition architecture for document processing.
- Google Noto Fonts: Noto Sans Gujarati and Noto Serif Gujarati by Google Fonts and the Monotype design team (SIL Open Font License).
- Gujarati Open-Source Typefaces: Rasa, Mogra, Shrikhand, Padauk, and Anek Gujarati created and published under the SIL Open Font License (OFL).
- OpenCV (cv2): Real-time computer vision, Otsu adaptive thresholding, morphological filtering, and contour extraction.
- PyTorch & Hugging Face Transformers: Tensor processing, tokenizer runtime, and neural inference pipelines.
- Gradio Client: Asynchronous event-driven streaming client for neural inference endpoints.
- Pillow (PIL): Raster image processing and format decoding.
- SoundFile & NumPy: High-performance numerical computing and WAV audio serialization.
- React Native Web & Expo: Multi-platform web application runtime for the handwriting practice suite.
- Jest: Fast and delighting JavaScript testing framework.
- Simple Icons & Lucide Icons: High-quality SVG brand icons and clean UI vectors.
KanoAI is licensed under the GNU GENERAL PUBLIC LICENSE.




