Hashtype is a state-of-the-art, open-source Android Voice-Typing Keyboard (IME) and Companion App. It is designed specifically for users who want complete control over their speech-to-text (STT) pipeline and data privacy.
Unlike traditional voice-typing keyboards that lock you into a single corporate service, Hashtype lets you bring your own API keys for Speech-to-Text (STT) and overlay Large Language Models (LLMs) to proofread, format, and polish your voice transcriptions in real time before they are entered.
- ๐๏ธ Bring Your Own API (STT): Connects directly to any OpenAI Whisper-compatible endpoints, Groq, Mistral, or your own self-hosted Whisper instance.
- ๐ค AI-Powered Cleaning (LLM): Automatically route transcriptions through an LLM (OpenAI GPT-4o, Anthropic Claude, or Google Gemini) to eliminate verbal stumbles ("umms", "ahhs"), correct grammar, and inject proper punctuation.
- โ๏ธ Customizable System Prompts: Take control of your AI's writing style. Configure the system prompt to automatically translate your spoken words, write code, format text as markdown, or convert your speech into formal business English.
- ๐ซง Draggable Floating Mic Widget: Voice-type anywhere in Android without switching your active keyboard! Toggle a customizable overlay floating microphone button that floats above other apps.
- ๐ Smart Auto-Paste Helper: When using the Floating Mic, an optional accessibility helper automatically pastes the finished, polished text straight into the active cursor field.
- ๐ Local Transcription History: View and search a secure local history of your transcriptions. Compare the Original Speech transcription side-by-side with the AI Cleaned text using expandable diff cards.
- ๐จ Dynamic Material 3 Design: Fully customizable keyboard accent colors, dark/light mode toggle, and a clean modern aesthetic that adapts to your Android device.
- ๐ Privacy-First Architecture:
- No middleman servers: The app communicates directly from your device to your configured APIs.
- No keyboard accessibility logging: Unlike other third-party keyboard apps, Hashtype does not require invasive accessibility permissions to log keystrokes. It only requests the Microphone permission for voice recording, and standard Overlay permissions if you use the floating mic.
graph TD
A[Press Microphone Button] --> B[Record High-Quality Audio]
B --> C[Send Audio to chosen STT Provider e.g. Whisper]
C --> D[Retrieve Raw Text Transcription]
D --> E{AI Cleaning Enabled?}
E -- Yes --> F[Send Raw Text + Custom System Prompt to LLM]
F --> G[Retrieve Polished & Corrected Text]
E -- No --> H[Insert Text Directly]
G --> I[Auto-Paste / Insert into Target App Text Field]
H --> I
I --> J[Save to Local History Database]
| โจ๏ธ Active IME Keyboard | โ๏ธ Settings Dashboard | ๐๏ธ Speech-To-Text Config |
|---|---|---|
| ๐ค Language Model Config | ๐ Text Insertion Result | ๐ History & AI Diffs |
|---|---|---|
| ๐ซง Floating Mic Customizer | ๐ฌ Floating Mic In-App Overlay |
|---|---|
| Provider | Speech-to-Text (STT) | Language Models (LLM) | Connection Method |
|---|---|---|---|
| OpenAI | โ (Whisper-1) | โ (GPT-4o, GPT-3.5, etc.) | Official API |
| Anthropic | โ | โ (Claude 3.5 Sonnet, etc.) | Official API |
| Google Gemini | โ | โ (Gemini 1.5 Pro/Flash) | Official API |
| Groq | โ (Whisper Large V3) | โ (Llama 3, Mixtral, etc.) | Official API |
| Mistral AI | โ (Mistral Large STT) | โ | Official API |
| Custom Endpoint | โ (OpenAI API Compatible) | โ (OpenAI API Compatible) | Self-hosted or third-party gateways |
- Download the latest release APK from the Releases page and install it on your Android device.
- Open the Hashtype app from your launcher.
- Go to Speech-to-Text, choose your provider (e.g., OpenAI or Groq), enter your API Key, and fetch/select your preferred transcription model.
- Go to Language Models, turn on "AI Cleaning", choose your LLM provider, enter your API key, and select a model.
- (Optional) Edit the System Prompt to define exactly how you want your text edited or formatted.
- Go to Android Settings > System > Languages & Input > On-screen Keyboard > Manage Keyboards.
- Enable Hashtype.
- Open any text field, swipe down or tap the keyboard selection menu, and switch to Hashtype Keyboard.
The power of Hashtype lies in its prompt flexibility. Here are some system prompts you can copy and paste into the LLM Settings:
"You are an assistant that formats spoken audio transcriptions. Fix spelling, capitalization, punctuation, grammar, and remove verbal fillers ('uh', 'um', 'like'). Do not add any conversational responses; output only the corrected transcript."
"Translate the following transcribed text from Chinese to natural, idiomatic English. Only return the final English translation. Do not explain, discuss, or prefix the translation."
"Format the transcribed text using appropriate Markdown syntax. Organize lists, bold key concepts, and structure paragraphs correctly. Return only the Markdown text."
Hashtype is built using a Dual Dart (Flutter) + Native Kotlin architecture. This separates configuration and high-performance background keyboard integrations.
โโโ android/app/src/main/kotlin/com/jia_yx/hashtype/
โ โโโ MainActivity.kt # Flutter MethodChannel bridge
โ โโโ VoiceInputMethodService.kt # Native IME Keyboard Service
โ โโโ VoiceImeViewModel.kt # Handles recording audio, API pipelines
โ โโโ VoiceImeView.kt # Native Material 3 Keyboard UI layout
โ โโโ ImeSettingsResolver.kt # Kotlin-side SharedPrefs JSON parser
โ โโโ HashtypeRecognitionService.kt # Android RecognitionService binding
โโโ lib/ # Flutter Configuration Application
โโโ main.dart # App entry point
โโโ pages/ # Pages for Test, History, Settings
โโโ services/ # Providers & settings service managers
The Kotlin InputMethodService manages recording and API calls natively. This ensures the keyboard launches instantly when tapping a text field, without waiting for a heavy Flutter engine to spin up. Both layers read configuration directly from the shared FlutterSharedPreferences file, keeping your configurations in sync seamlessly.
To compile the application yourself, make sure you have the Flutter SDK and Android SDK installed.
-
Install dependencies:
flutter pub get
-
Run static code analysis:
flutter analyze
-
Build a release APK: Make sure you have a
key.propertiesfile configured at theandroid/directory root, then run:flutter build apk --release
-
Build Google Play App Bundle:
flutter build appbundle --release
Contributions are always welcome! Feel free to open a Pull Request (PR) or submit an Issue if you encounter bugs, want to suggest new features, or can improve our UI/documentation.
This project is licensed under the GPL v3 License.
Created with โค๏ธ for the open-source privacy-focused community.