Projects

abataku

Offline Android learning app for numbers, letters, and words in English, Indonesian, and Arabic—with on-device speech recognition, tracing, and handwriting scoring.

Status
On Google Play
Platform
Android · tablet first, phone supported
Built with
Kotlin · Jetpack Compose
Speech AI
ZIPA-CR small + Silero VAD on trimmed ONNX Runtime (3.2 MB)
Network
None, fully offline
Play Store
Automated store listing with release notes and screenshots
Gate
gate.sh · quality-kit
Harness
Claude · Cursor · Antigravity CLI
Started
Oct 2026
Trace Activity: the letter B with its first stroke traced in blue and a star leading the second stroke
Trace Activity: ink snaps to the ideal stroke, never finger jitter.

Overview

Abataku teaches Numbers, Letters, and Words in English, Indonesian, and Arabic through six activities: Drag (slot matching), Trace (guided strokes), Count (spoken quantities), Spell (including Arabic cursive joining), Say (on-device pronunciation), and Write (freehand shape scoring).

Built under strict Islamic Content Fence rules: no music (only natural birdsong), faceless animal and vehicle mascots, no ads, accounts, timers, or fail states.

Stack

App & UI

Kotlin + Jetpack Compose
Single activity, minSdk 26; every screen is preview-driven for JVM screenshot gates.
Pure-Kotlin domain layer
Catalogs, progress, and scoring engines stay Android-free for fast JVM unit tests.
SharedPreferences store
Local-only progress with backward-compatible migration from Flutter v1.
Show Me gesture host
Silent glove hint that models interactions when a toddler hesitates.

On-device ML & Speech

ZIPA-CR small + Silero VAD
Hands-free turn detection (Silero VAD v6.2.3) feeding INT8 ZIPA-CR on-device.
Trimmed ONNX Runtime
Custom operator build trims arm64 binary from 34 MB to 3.2 MB with telemetry stripped.
Pure-Kotlin CTC scorer
Pronunciation scoring with forgiving child phoneme allowances (e.g. Arabic q/ħ/ʕ).

Algorithms & Geometry

ArabicJoining engine
Morphs isolated Arabic tiles into initial, medial, or final cursive forms on drop.
Bounded-lookahead sampler
Normalized 0–100 strokes prevent shortcut scribbles while snapping ink to ideal paths.
Multi-point shape matcher
Scores freehand ink on coverage, segment minimums, precision, ink cap, and stray runs.

Quality & Release

quality-kit kotlin-android pack
ktfmt, detekt + Compose rules, Android Lint, Kover, and dependency analysis.
Robolectric + Roborazzi
65+ UI previews verified against screenshot goldens on the JVM with no emulator.
Gradle Play Publisher
Versioned en-US/id/ar listings that sync Roborazzi goldens directly into store art.

Engineering highlights

  1. Tracing that can't be cheated by a scribble

    Glyphs use a 0–100 coordinate box with a bounded-lookahead catch zone so children can't skip strokes, while ink snaps to the ideal curve. Arabic traces body first (RTL) then dot taps; identical Latin glyphs share progress across English and Indonesian.

    Tracing the Arabic letter tha: body traced, with numbered circles for its three dots still to tap
    ث (tha): body traced, three dots left to tap.
  2. Hands-free on-device speech scoring (Say)

    Silero VAD v6.2.3 detects spoken turns automatically and passes audio to INT8 ZIPA-CR small, graded by a pure-Kotlin CTC scorer with child-friendly phoneme allowances—completely offline.

    Say Activity on phone: hands-free speech evaluation with pulsing listening ring
    Say Activity: hands-free listening powered by on-device VAD and phoneme scoring.
  3. Animated Arabic cursive joining (Spell)

    JoinedSpellWord renders Arabic words as one shaped glyph run with per-letter bounds. As isolated tiles fly from the RTL tray, ArabicJoining morphs them into proper initial, medial, or final cursive forms.

    Arabic Spell Activity on phone: joined Arabic word with right-to-left letter tiles
    Arabic Spell: right-to-left tiles morph into joined cursive forms.
  4. Freehand letter scoring by shape (Write)

    Each freehand stroke is matched to its target letter and must pass five geometric checks at one offset: coverage, per-segment minimums (no A without a crossbar), precision, an ink cap against coloring-in, and no long stray runs (rejecting O over C).

    Write Activity: an orange cat Friend above the dotted word CAT, with the C written and checked
    Write Activity: C accepted, A and T still dotted.
  5. Data-driven mascot motion shared with the design tool

    Ten faceless mascots animate via JSON math expressions (e.g. -170 * sin(PI * span(0.16, 0.6))) parsed identically by the browser design canvas and Compose, falling back to still poses under reduced motion.

    Sheet of faceless animal Friends (cat, cow, duck, sheep, hen) in their poses
    Animal Friend poses, verified via screenshot goldens.
  6. Headless screenshot goldens reused as Play Store art

    Over 65 @Preview screens render under Robolectric and Roborazzi on the JVM without an emulator. A Gradle task copies selected goldens directly into Play Store graphics so store art stays in sync with shipped UI.

Architecture

Hands-free speech evaluation on-device

  1. Silero VADDetects speech start and end at 16 kHz, ignoring ambient noise.
  2. Waveform isolationSlices the spoken segment with short padding to avoid empty inferences.
  3. ZIPA-CR scoringRuns INT8 ONNX inference and pure-Kotlin CTC goodness-of-pronunciation.
  4. Forgiving matchingApplies child phoneme allowances into Perfect, Good, or Close Enough tiers.
  5. Mascot praiseCelebrates or encourages a retry with zero fail states.

Challenges & lessons

  • Choose a toolchain coding agents can iterate in

    Porting from Flutter v1 to Kotlin and Jetpack Compose let agents compile, render Compose previews on a headless JVM via Robolectric, and inspect screenshot diffs in seconds—making screenshot gates and automated Play graphics practical on every commit.

Decisions

  • On-device ML (ONNX Runtime, VAD)
  • Speech recognition & pronunciation scoring
  • Screenshot testing (Roborazzi)
  • Gesture & geometry algorithms
  • Arabic typography & RTL cursive joining
  • Offline-first design
  • Data-driven animation
  • Release automation (GPP)