Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

54 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Hashtype Icon

Hashtype ๐ŸŽ™๏ธ๐Ÿค–

English | ็ฎ€ไฝ“ไธญๆ–‡

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.


๐Ÿš€ Key Features

  • ๐ŸŽ™๏ธ 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.

๐Ÿ—๏ธ How It Works (Transcription Pipeline)

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]
Loading

๐Ÿ“ธ App Screenshots

Core Keyboard & Setup Experience

โŒจ๏ธ Active IME Keyboard โš™๏ธ Settings Dashboard ๐ŸŽ™๏ธ Speech-To-Text Config
Ready Settings STT Settings

AI Integration & History Logs

๐Ÿค– Language Model Config ๐Ÿ“ Text Insertion Result ๐Ÿ“œ History & AI Diffs
LLM Settings Inserted History Diff Logs

Floating Voice Input Widget

๐Ÿซง Floating Mic Customizer ๐Ÿ’ฌ Floating Mic In-App Overlay
Floating Mic Customizer Floating Mic Active

โš™๏ธ Supported Providers

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

๐Ÿ› ๏ธ Installation & Activation

Step 1: Install the APK

  • Download the latest release APK from the Releases page and install it on your Android device.

Step 2: Configure API Keys

  1. Open the Hashtype app from your launcher.
  2. Go to Speech-to-Text, choose your provider (e.g., OpenAI or Groq), enter your API Key, and fetch/select your preferred transcription model.
  3. Go to Language Models, turn on "AI Cleaning", choose your LLM provider, enter your API key, and select a model.
  4. (Optional) Edit the System Prompt to define exactly how you want your text edited or formatted.

Step 3: Enable the Input Method

  1. Go to Android Settings > System > Languages & Input > On-screen Keyboard > Manage Keyboards.
  2. Enable Hashtype.
  3. Open any text field, swipe down or tap the keyboard selection menu, and switch to Hashtype Keyboard.

๐Ÿ’ก System Prompt Customization Examples

The power of Hashtype lies in its prompt flexibility. Here are some system prompts you can copy and paste into the LLM Settings:

1. Default Grammar & Punctuation Clean Up

"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."

2. Auto-Translator (Speak Chinese โžก๏ธ Input English)

"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."

3. Markdown Formatter

"Format the transcribed text using appropriate Markdown syntax. Organize lists, bold key concepts, and structure paragraphs correctly. Return only the Markdown text."


๐Ÿงฑ Project Architecture

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

Why Dual Implementations?

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.


๐Ÿง‘โ€๐Ÿ’ป Development & Build Setup

To compile the application yourself, make sure you have the Flutter SDK and Android SDK installed.

Build Commands (Repo Root)

  1. Install dependencies:

    flutter pub get
  2. Run static code analysis:

    flutter analyze
  3. Build a release APK: Make sure you have a key.properties file configured at the android/ directory root, then run:

    flutter build apk --release
  4. Build Google Play App Bundle:

    flutter build appbundle --release

๐Ÿค Contributing

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.

๐Ÿ“„ License

This project is licensed under the GPL v3 License.


Created with โค๏ธ for the open-source privacy-focused community.

About

The speech to text board for android phone

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages