A low latency voice-activated AI assistant using OpenAI's Realtime API as a local MCP client.
- Runs in the terminal on Mac OS.
- Streams audio from the microphone directly to OpenAI's GPT 4o.
- Streams the AI's response back to the terminal in real time.
- Implements a local MCP bridge, allowing the model to call tools locally on your machine when you ask it to.
- Can be configured to use any available MCP server in standard
mcp.jsonformat. - Tool use requests can be approved/denied with a single keyboard press from any window.
- Requires an OpenAI API token.
- Python 3.9+
- uv package manager
- macOS with
brew install portaudio ffmpeg - OpenAI API key
-
Clone and setup:
git clone <repo-url> cd typo
-
Set your OpenAI API key:
export OPENAI_API_KEY="your-api-key-here"
-
Run with uv:
./typo.py
-
Start talking:
- Press
k+ Enter to manually start recording - The app uses Voice Activity Detection (VAD) - just talk to it!
- The AI will automatically respond when you stop talking
- Press
-
Tool Approvals
- typo will print tool requests to the terminal
- Right Command (⌘) to approve (works globally)
- Right Option (⌥) to reject (works globally)
- CLI: Type
yorn+ Enter
The goal is to get typo to the point where it can do computer work hands free. Improvements and suggestions for this repo are very welcome! The main things it needs are:
- Scripts to publish this repo to pypi/uvx so it can be easily installed and run
- A good set of default MCP servers and a matching system prompt so that it can do MacOS system control fairly seamlessly out of the box
Edit system_prompt.md to customize the AI's behavior:
You are a concise banana. Always speak in code.Configure MCP servers in mcp.json:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory"]
},
}
}Change log level in typo.py:
LOG_LEVEL = "info" # Options: "debug", "info", "error"debug: All messages (verbose)info: Info and error messages (default)error: Error messages only
- macOS: Install dependencies with
brew install portaudio ffmpeg - Permissions: Grant microphone access when prompted
- No audio output: Check your speakers/headphones
- Quota exceeded: Check your OpenAI usage and billing
- Connection failed: Verify your API key is valid
- Response failures: Check debug logs with
LOG_LEVEL = "debug"
- Tools not available: Check MCP server configuration in
mcp.json - Server errors: Verify MCP server installation and permissions
- Authentication: Ensure API keys are set for external services