Linux-first speech-to-text terminal UI
Project description
sttui: Speech To Text in your terminal
No browser. No Web UI. Fast speech-to-text with the best models
https://github.com/user-attachments/assets/252ba77e-d3f3-4689-bcc1-77f536f10c60
Setup
pip install sttui
(or if you have uv installed, uvx sttui)
Then, you must have an account on openrouter, and get an API key.
To register it, run:
sttui auth
Storage of your key
Your key will be stored inside ~/.config/sttui/auth.json
Make sure you don't commit this file !
Config
When you first start the app, a config file is created at: ~/.config/sttui/config.toml
You can specify the default model (without the openrouter prefix), the prompt, and the maximum audio length.
[transcription]
model = "mistralai/voxtral-small-24b-2507"
prompt = """
You are a helpful assistant that can hear audio and write text.
Return a transcription of the user audio as json. If the user request is empty, return null.
<format>
{
"transcription": ""
}
</format>
<format>
{
"transcription": null
}
</format>
"""
max_seconds = 600
⚠️ Make sure that the prompt asks the model to answer in this json format, it's the one expected by sttui
Commands
# Start interactive dictation TUI
sttui
# Equivalent explicit run command
sttui run
# Show CLI help
sttui --help
# Set or update API key
sttui auth
# TUI + write transcript to stdout on Enter
sttui --stdout
# Override model and recording cap for this run
sttui --model google/gemini-2.5-flash --max-seconds 120
# Use a custom config file
sttui --config ~/.config/sttui/config.toml
# Record, transcribe, and send to an HTTP endpoint
sttui --send-post https://example.com --send-body '{"text": $0}'
# Send transcript to a shell command
sttui --send-command 'xargs -I {} notify-send "{}"'
# Send transcript to a Unix socket (e.g., pi coding agent)
sttui --send-socket /run/user/1000/pi/sttui.sock --send-body '{"message": $0}'
# Chain multiple sends (with 1s delay between them)
sttui --send-post https://example.com/foo --send-body '{"a": $1}' \
--send-post https://example.com/bar --send-body '{}' \
--send-delay 1000
# Background lifecycle (no TUI)
sttui background start
sttui background stop
sttui background toggle
# Same with desktop notifications
sttui background --notify start
Send Command Templates
In --body templates, use $0 for the full transcript, $1/$2/etc. for individual parts.
Values are JSON-escaped automatically when a --body template is provided.
All recordings and transcripts are stored in ~/.local/share/sttui/recordings/.
Integrations
AI coding agents (opencode, pi)
Dictate directly into coding agents.
pi coding agent
Dictate directly into pi using sttui's socket integration.
Copy the extension to your pi extensions folder:
mkdir -p ~/.pi/agent/extensions
cp integrations/pi.ts ~/.pi/agent/extensions/sttui.ts
After starting pi, you'll see the sttui command in the chat.
Contributing
This is a side-project of mine. I must admit there is mostly AI-generated code, but I try to review and ensure good practices.
I don't have strong opinions about how this project should evolve. If you find it useful, feel free to contribute !
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sttui-0.3.0a4.tar.gz.
File metadata
- Download URL: sttui-0.3.0a4.tar.gz
- Upload date:
- Size: 31.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58a2552d0dc4b461730be31b30c5c764baf3570067b3d37013c0d19655a6c03a
|
|
| MD5 |
67748fb35d8465f1fd5e1654a0bb4e19
|
|
| BLAKE2b-256 |
a498cceac37663da608b7cfea0a30543db0f929b9065eb9f48766ce373dfbaed
|
Provenance
The following attestation bundles were made for sttui-0.3.0a4.tar.gz:
Publisher:
publish.yaml on rambip/sttui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sttui-0.3.0a4.tar.gz -
Subject digest:
58a2552d0dc4b461730be31b30c5c764baf3570067b3d37013c0d19655a6c03a - Sigstore transparency entry: 1382483698
- Sigstore integration time:
-
Permalink:
rambip/sttui@19c341d25a172d96e4041eb77325ddbad5ebd383 -
Branch / Tag:
refs/tags/v0.3.0a4 - Owner: https://github.com/rambip
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@19c341d25a172d96e4041eb77325ddbad5ebd383 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sttui-0.3.0a4-py3-none-any.whl.
File metadata
- Download URL: sttui-0.3.0a4-py3-none-any.whl
- Upload date:
- Size: 31.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76a367c73c31ae30ea92a0e183ffcc4d81a70f112d43facb5ed143e15ef854c2
|
|
| MD5 |
fc1089aacbd5cb82558b9a4f1a0c379b
|
|
| BLAKE2b-256 |
5f2c9f358a33353db095eaed4d5892954a7a86c189a23bef3b4679c39b77c2e6
|
Provenance
The following attestation bundles were made for sttui-0.3.0a4-py3-none-any.whl:
Publisher:
publish.yaml on rambip/sttui
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sttui-0.3.0a4-py3-none-any.whl -
Subject digest:
76a367c73c31ae30ea92a0e183ffcc4d81a70f112d43facb5ed143e15ef854c2 - Sigstore transparency entry: 1382483709
- Sigstore integration time:
-
Permalink:
rambip/sttui@19c341d25a172d96e4041eb77325ddbad5ebd383 -
Branch / Tag:
refs/tags/v0.3.0a4 - Owner: https://github.com/rambip
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@19c341d25a172d96e4041eb77325ddbad5ebd383 -
Trigger Event:
push
-
Statement type: