Add provider-backed dictation mode (#1327)

This commit is contained in:
SSU-WEI HUANG
2026-08-03 06:05:58 +08:00
committed by GitHub
parent abf9cb02a5
commit 9d07857570
22 changed files with 934 additions and 43 deletions
+6
View File
@@ -190,6 +190,12 @@ On first run, HAPI:
| `DB_PATH` | `~/.hapi/hapi.db` | - | Database file path |
| `ELEVENLABS_API_KEY` | - | - | ElevenLabs API key for voice |
| `ELEVENLABS_AGENT_ID` | Auto-created | - | Custom ElevenLabs agent ID |
| `OPENAI_API_KEY` | - | - | OpenAI API key for dictation (`gpt-4o-transcribe`) |
| `DEEPGRAM_API_KEY` | - | - | Deepgram API key for dictation (`nova-3`) |
| `GROQ_API_KEY` | - | - | Groq API key for dictation (`whisper-large-v3`) |
| `TRANSCRIPTION_BASE_URL` | - | - | OpenAI-compatible/local transcription base URL |
| `TRANSCRIPTION_MODEL` | - | - | Model for the OpenAI-compatible transcription endpoint |
| `TRANSCRIPTION_API_KEY` | - | - | Optional bearer token for that endpoint |
</details>
<details>
+22 -2
View File
@@ -1,7 +1,26 @@
# Voice Assistant
# Voice input and assistant
Control your AI coding agent with voice using the built-in voice assistant powered by ElevenLabs Conversational AI.
For speech-to-text without a spoken assistant, open **Settings → Voice**, choose **Dictation**, then select a configured provider. Dictation records until you tap the microphone again, inserts the transcript into the composer, and never sends it automatically. Standard mode is the default.
Provider credentials are read only from the hub's startup environment:
```bash
# Pick any providers you use
export OPENAI_API_KEY="..." # gpt-4o-transcribe
export ELEVENLABS_API_KEY="..." # scribe_v2
export DEEPGRAM_API_KEY="..." # nova-3
export GROQ_API_KEY="..." # whisper-large-v3
# Or an OpenAI-compatible local server such as Speaches
export TRANSCRIPTION_BASE_URL="http://127.0.0.1:8000/v1"
export TRANSCRIPTION_MODEL="Systran/faster-whisper-large-v3"
export TRANSCRIPTION_API_KEY="..." # optional
```
Restart the hub after changing credentials. API keys are not entered or stored in the web app.
## Overview
The voice assistant lets you:
@@ -14,7 +33,8 @@ The assistant bridges voice communication with your active coding agent (Claude
## Prerequisites
An [ElevenLabs](https://elevenlabs.io) account with API access
- Voice assistant: an [ElevenLabs](https://elevenlabs.io) account with API access
- Dictation: at least one configured provider above, or an OpenAI-compatible local server
## Setup