Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

RapidInfosoft/shre-keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shre Keyboard

AI-powered keyboard for iOS and Android with voice-to-text and full Shre AI platform integration.

Features

  • Voice-to-Text: On-device STT (Apple Speech / Google SpeechRecognizer) with cloud Whisper fallback via shre-router
  • Shre AI Agent Access: Talk to any Shre agent from any app — the keyboard routes intent through shre-router
  • Smart Compose: Context-aware text generation, replies, translations
  • Workspace-Aware: Knows your stores, agents, and data through shre-context
  • Conversation Memory: Persistent sessions via Working Memory (Tier 2)
  • Cost Tracking: Per-request billing through shre-meter

Architecture

shre-keyboard (device)
├── Voice capture (on-device mic)
├── Local STT (Apple Speech / Google SpeechRecognizer)
├── Shre Client SDK (shared Kotlin Multiplatform)
│   ├── Auth (shre-auth, API key / device token)
│   ├── Chat (shre-router /v1/chat — agent routing)
│   ├── Audio (shre-router /v1/audio/* — Whisper STT)
│   └── Context (shre-context — workspace injection)
└── Platform keyboard extension (IME / UIInputViewController)

Project Structure

shre-keyboard/
├── android/          # Android IME (Input Method Service)
│   └── app/
├── shared/           # Kotlin Multiplatform — Shre client SDK
│   └── src/
│       ├── commonMain/   # Shared API client, models, auth
│       ├── androidMain/  # Android-specific (OkHttp, speech)
│       └── iosMain/      # iOS-specific (URLSession, Speech)
├── ios/              # iOS Keyboard Extension (Swift)
│   └── ShreKeyboard/
└── docs/             # Architecture docs

Getting Started

Android

cd android
./gradlew installDebug

Then enable "Shre Keyboard" in Settings > System > Languages & Input > On-screen keyboard.

iOS

# Install xcodegen (one-time)
brew install xcodegen

# Generate Xcode project
cd ios
xcodegen generate

# Open in Xcode
open ShreKeyboard.xcodeproj

Build to a real device (keyboard extensions don't work in Simulator), then:

  1. Settings > General > Keyboard > Keyboards > Add New Keyboard > Shre Keyboard
  2. Tap Shre Keyboard > Allow Full Access (required for mic + network)

Voice Engine (3-Tier STT)

Tier 1: On-device (Apple Speech / Google)  — 0ms, free, instant partials
Tier 2: NVIDIA Riva (Shadow PC, GPU)       — ~50ms via Tailscale
Tier 3: Whisper via shre-router (cloud)    — ~300ms fallback
Tier Provider Latency Languages Cost
1 Apple Speech / Google STT 0ms 50+ Free
2 NVIDIA Riva (RTX 4070 Ti) ~50ms 11 native Free (self-hosted)
3 faster-whisper / OpenAI ~300ms 99+ Metered

TTS cascade: Riva TTS > PersonaPlex > ElevenLabs > OpenAI TTS

Shre Platform Integration

Feature Endpoint Service
Voice transcription POST /v1/audio/transcriptions shre-router (cascade)
Voice session (WS) POST /v1/voice/session shre-router (Riva/PersonaPlex/OpenAI)
TTS synthesis POST /v1/audio/speech shre-router (cascade)
AI chat / agents POST /v1/chat shre-router
Voice engine status GET /v1/voice/status shre-router
Authentication POST /v1/auth/device shre-auth
User context GET /v1/context shre-context
Usage metering automatic shre-meter

Multilingual Support (50+ languages)

Speak in any supported language. Three output modes:

  • = Same: Insert in the language you spoke
  • -> EN: Auto-translate to English before inserting
  • -> Target: Translate to any chosen language

Regions: English (3), Americas/Europe (20), South Asia (12), East/SE Asia (9), Middle East/Africa (8)

Configuration

Copy .env.example to .env and set:

  • SHRE_API_URL: shre-router URL (default https://127.0.0.1:5497)
  • SHRE_API_KEY: Generated from MIB007 dashboard

Or configure in the app's settings screen (shared via App Group on iOS, SharedPreferences on Android).

License

Proprietary — Nirlab Inc.

About

Shre AI Keyboard — voice-to-text with full platform integration (iOS + Android)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors