feat(telegram): add voice message transcription support#16
Draft
geminixiang wants to merge 1 commit into
Draft
Conversation
Receive voice notes, audio files, and video notes from Telegram and transcribe them to text via OpenRouter (or other providers) using multimodal chat completions API. Original audio files are preserved as attachments. STT provider/model configurable via settings.json (sttProvider/sttModel) or environment variables. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Configuration
{ "sttProvider": "openrouter", "sttModel": "google/gemini-2.5-flash" }Requires
OPENROUTER_API_KEYenvironment variable (or other provider key).Changed files
src/config.ts—sttProvider/sttModelfields in AgentConfigsrc/adapters/telegram/transcribe.ts— New transcription modulesrc/adapters/telegram/bot.ts— Voice/audio/video_note handling + transcription integrationsrc/main.ts— Wires STT config to TelegramBotTest plan
sttProvider/sttModelin settings.json and send a voice note to the botlog.jsonl.oggfile saved inattachments/npm testpasses (162 tests)🤖 Generated with Claude Code