360 Secure SkillHub
360 安全技能中心

Telegram Voice STT (Windows)

该 Skill 描述 OpenClaw 收到 Telegram 语音消息后,先调用基于 Google Cloud Speech-to-Text 的脚本把 .ogg 语音转写为文本,再以转写内容作为用户问题交给助手回答;并规定助手在已有转写时不得声称无法处理音频,另附 Windows 下手动测试命令。

aditya0320
aditya0320
热度 16.02
最近更新 2026-06-12 19:35:38
分类:效率依赖:代码执行 / 第三方 API / 读写文件应用场景:文件转换 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add telegram-voice-stt
Metadata
name
telegram-voice-stt
description
Transcribe Telegram voice notes to text before the assistant replies. Use when the user sends a voice message on Telegram (@AadiAssistantbot), or mentions voice note, speech to text, STT, audio to text, or whisper on Telegram. OpenClaw auto-transcribes inbound .ogg voice files; treat the transcript as the user's question and answer it directly.
version
1.0.0
metadata
{"openclaw":{"emoji":"🎙️","os":["win32"],"requires":{"env":["GOOGLE_APPLICATION_CREDENTIALS","GOOGLE_CLOUD_PROJECT"]},"primaryEnv":"GOOGLE_APPLICATION_CREDENTIALS"}}

Telegram Voice → Text (STT)

When a user sends a voice note on Telegram, OpenClaw transcribes it before the model runs.

How it works

  1. Telegram delivers .ogg voice file to .openclaw/media/inbound/
  2. Gateway runs transcribe-audio-cli.js (Google Cloud Speech-to-Text)
  3. Transcript replaces <media:audio> in the user message
  4. Optional echo: user sees 📝 Heard: "..." in Telegram
  5. Assistant answers the transcribed text via Bifrost → genapp-proxy → Dialogflow

Rules for the assistant

  • Never say "I cannot process audio" if a transcript is present
  • Reply to the transcript content as the user's actual question
  • For Hindi/English mix, answer in the language the user spoke or ask which they prefer
  • If transcription is empty, ask the user to type their message or re-record

Stack

  • OpenClaw: tools.media.audio CLI model → ~/.openclaw/gcp/transcribe-audio-cli.js
  • Fallback: genapp-proxy also transcribes voice before Dialogflow (8192 token limit)

Manual test (gateway machine)

node "$env:USERPROFILE\.openclaw\gcp\transcribe-audio-cli.js" "C:\path\to\voice.ogg"