Android Local Stt Tts

Patterns for local Speech-to-Text and Text-to-Speech without cloud latency.

prasad-vennam Updated

File contents

Android On-Device Speech (TTS & STT) 🎤

Implementing accessible voice interfaces.

⚡ When to Use

  • When handling local voice commands or reading text aloud.

🏗️ Core Rules / Pillars

1. Standard TTS initialization

  • Pattern: Initialize TextToSpeech and pass OnInitListener. Always wait until initialization is successful before calling .speak().

2. SpeechRecognizer Intent

  • Pattern: Use SpeechRecognizer.createSpeechRecognizer(context) and RecognizerIntent.ACTION_RECOGNIZE_SPEECH for local dictation.

🚧 Critical Anti-Hallucination Guards

  • Trap: Ensure RECORD_AUDIO permission is requested before initializing the SpeechRecognizer.

prasad-vennam/Awesome-Android-AI-Agent-Skills/tree/main/skills/android-local-stt-tts commit 5e6c368601

Frequently asked questions

npx skillmds@latest add prasad-vennam/android-local-stt-tts