feat: telegram voice transcription (#74)

This commit is contained in:
banteg
2026-01-09 20:57:04 +04:00
committed by GitHub
parent 8421ec8b4a
commit 780ba72b3a
14 changed files with 440 additions and 7 deletions
+18
View File
@@ -16,6 +16,24 @@ This document captures current behavior so transport changes stay intentional.
4. High-value messages enqueue a send.
5. All writes go through the outbox.
## Incoming messages
`parse_incoming_update` accepts text messages and voice notes.
If voice transcription is enabled, takopi downloads the voice payload from Telegram,
transcribes it with OpenAI, and routes the transcript through the same command and
directive pipeline as typed text.
Configuration (under `[transports.telegram]`):
```toml
voice_transcription = true
```
Set `OPENAI_API_KEY` in the environment. If transcription is enabled but the API key
is missing or the audio download fails, takopi replies with a short error and skips
the run.
## Outbox model
- Single worker processes one op at a time.