The iPhone keyboard with voice and AI you can self-host.
A full keyboard that learns your words. On your iPhone, in the cloud, or on your own server.
|
|
|
Website • Self-Hosting Guide • Privacy Policy
Diction is a keyboard for your iPhone that you can talk to. Tap the mic in any app, say what you mean, and get text you can send as it is. Under the mic sits a full keyboard that learns your words, so you never have to switch back to Apple's.
Your voice goes where you choose. It can stay on your phone, go to Diction Cloud, or go to a server you run yourself. On your phone and on your own server, Diction is free, with no account and no limits.
This repo is the part you run yourself. It's a small server, the Diction gateway, that sits between the keyboard and a speech model of your choice. It streams your voice while you talk, so the text is ready almost as soon as you stop. It keeps that audio encrypted on the way, and it can tidy the text with an AI model you pick.
flowchart LR
phone["📱 Diction keyboard<br>on your iPhone"] -- "your voice" --> gateway["Diction gateway<br>(this repo)"]
gateway -- "audio" --> speech["🎙️ Speech model<br>Parakeet, Whisper…"]
gateway -. "text, optional" .-> llm["✨ AI model<br>Ollama, OpenAI…"]
gateway -- "finished text" --> phone
You'll run a small speech server at home, and your iPhone will send your voice there instead of to someone else's cloud.
What you need:
- Any computer that runs Docker: a home server, a NUC, a Raspberry Pi 4 or 5, or a small VPS. No graphics card needed.
- About 3 GB of free memory and 2 GB of disk space.
- An iPhone on iOS 17 or newer, with Diction from the App Store installed.
Then follow the five steps below. Click a step to open it.
Step 1 - Write the compose file
Make a folder and save this in it as docker-compose.yml:
services:
parakeet:
image: dictionlabs/parakeet:latest-int8
container_name: diction-parakeet
restart: unless-stopped
healthcheck:
test: ["CMD", "bash", "-c", "echo > /dev/tcp/localhost/5092"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
gateway:
image: dictionlabs/gateway:latest
container_name: diction-gateway
restart: unless-stopped
ports:
- "8080:8080"
depends_on:
- parakeet
environment:
DEFAULT_MODEL: parakeet-v3
volumes:
# Keeps your phone paired when the container is rebuilt.
- gateway-data:/data
volumes:
gateway-data:This uses Parakeet, a fast speech model that runs on any CPU and knows 25 European languages. Need another language? Swap in Whisper, which knows 99: see Speech models.
Is your server reachable from the internet? Then anyone who finds it can use it. Turn on pairing first, or keep it private with Tailscale.
Step 2 - Start it
docker compose up -dGive it half a minute, then check that both containers are up:
docker compose psSomething not starting? See Troubleshooting.
Step 3 - Check that it hears you
Make a short recording:
say -o test.wav --data-format=LEI16@16000 "Hello from my home server" # on a Mac
espeak-ng -w test.wav "Hello from my home server" # on LinuxSend it to your server:
curl -X POST http://localhost:8080/v1/audio/transcriptions \
-F "file=@test.wav" -F "model=parakeet-v3"You should get your words back:
{"text":"Hello from my home server."}Step 4 - Find your server's address
On Linux, run hostname -I; on a Mac, ipconfig getifaddr en0. You're looking for something like 192.168.1.42.
Tip: give the server a fixed address in your router, so it doesn't change after a restart.
Step 5 - Connect your iPhone
- Open Diction and follow its setup to turn on the keyboard.
- In the app, open Mode and choose Self-Hosted.
- Tap Scan to Pair and scan the QR code that the server prints. To see it again, run
docker exec diction-gateway gateway auth. Or tap Enter Manually and type your address, likehttp://192.168.1.42:8080.
When the app says Speech model ready, you're done. Open any app, switch to the Diction keyboard, tap the mic and talk.
Once it works, there's plenty more you can do:
- Use it away from home. Tailscale is the easy way; a Cloudflare tunnel works too. → Away from home, safely
- Lock it to your own phones. Only paired devices get in. → Pairing
- Speak more languages, or use your GPU. Run Whisper on a CPU or an NVIDIA card, or keep the speech server you already have. → Speech models
- Let AI tidy your words. Plug in Ollama or any OpenAI-compatible model, and filler words go, punctuation lands, and you can edit text just by saying what to change. → AI cleanup
- See your words as you talk. → Live text
- Run it on NixOS without Docker. → NixOS
- Use it from your own scripts. It speaks the OpenAI transcription API. → OpenAI API
Updating is one line: docker compose pull && docker compose up -d. Your phones stay paired. More in Upgrading.
Something wrong? Start with Troubleshooting. For every route and setting in one place, see AGENTS.md.
On your phone, nothing leaves it. On your own server, your voice goes to that server and nowhere else, and it's thrown away once it's turned into text. With Diction Cloud, it's transcribed on Diction's servers and thrown away too: never stored, never used for training.
The keyboard has no ads and no tracking, and what you type on the keys never leaves your phone. iOS asks you to allow Full Access only because the keyboard needs the network to send your voice to the place you picked. The full story is in the Privacy Policy.
Don't want to run a server? Diction Cloud does it for you, with no setup. Diction runs the speech models and the AI on its own GPU servers. You get the most accurate transcription and every writing tool from the first tap. There's a free trial in the app.
Contributions are welcome. See CONTRIBUTING.md.
MIT. See LICENSE.