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 --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 --body '{"message": $0}'
# Chain multiple sends (with 1s delay between them)
sttui send --post https://example.com/foo --body '{"a": $1}' \
--post https://example.com/bar --body '{}' \
--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
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 !
Metadata
Release files for sttui 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sttui-0.2.4.tar.gz | 28.0 kB | With provenance | Details for sttui-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sttui-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for sttui-0.2.4-py3-none-any.whl |
Total release size: 56.0 kB
Release files / sttui-0.2.4.tar.gz
| Download URL | sttui-0.2.4.tar.gz |
|---|---|
| Size | 28.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
789dcb0055a48361c0279e84a1ab2d0038027cd71f0d9ef8864a253033937249
|
|
BLAKE2b-256 checksum How to use checksums |
8ef4ee56eeee7b2ed190c886e6ee5cc5e3216fb45616d1de9f38b7a032c46fe9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 17, 2026.
Transparency logRelease files / sttui-0.2.4-py3-none-any.whl
| Download URL | sttui-0.2.4-py3-none-any.whl |
|---|---|
| Size | 28.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6c0752e6f481dcf8a7d86098623900a5c30b16e56afa5be36b21ec256f4c7949
|
|
BLAKE2b-256 checksum How to use checksums |
d33c7246b52c3498f16a64831fcbcaa2fcb770a829a49f64cef768fa2ad5ede7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 17, 2026.
Transparency logSecurity for sttui 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sttui-0.2.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.