← 返回
沟通协作 中文

Telegram Voice To Voice Macos

Telegram voice-to-voice for macOS Apple Silicon: transcribe inbound .ogg voice notes with yap (Speech.framework) and reply with Telegram voice notes via say+ffmpeg. Not compatible with Linux/Windows.
适用于 macOS Apple Silicon 的 Telegram 语音互转工具:利用 yap 转录入站 .ogg 语音,并通过 say+ffmpeg 回复语音消息。不兼容 Linux/Windows。
fiberian1981
沟通协作 clawhub v0.1.3 1 版本 99817.4 Key: 无需
★ 0
Stars
📥 2,186
下载
💾 72
安装
1
版本
#latest

概述

Telegram voice-to-voice (macOS Apple Silicon only)

This is an OpenClaw skill.

Requirements

  • macOS on Apple Silicon.
  • yap CLI available in PATH (Speech.framework transcription).
  • Project: https://github.com/finnvoor/yap (by finnvoor)
  • ffmpeg available in PATH.

Compatibility note (important)

This skill is macOS-only (uses say + Speech.framework). The skill registry cannot enforce OS restrictions, so installing/running it on Linux/Windows will result in runtime failures.

Persistent reply mode (voice vs text)

Store a small per-user preference file in the workspace:

  • State file: voice_state/telegram.json
  • Key: Telegram sender user id (string)
  • Values:
  • "voice" (default): reply with a Telegram voice note
  • "text": reply with a single text message

If the file does not exist or the sender id is missing: assume "voice".

Toggle commands

If an inbound text message is exactly:

  • /audio off → set state to "text" and confirm with a short text reply.
  • /audio on → set state to "voice" and confirm with a short text reply.

Getting the inbound audio (.ogg)

Telegram voice notes often show up as in message text.

OpenClaw saves the attachment to disk (typically .ogg) under:

  • ~/.openclaw/media/inbound/

Recommended approach:

1) If the inbound message context includes an attachment path, use it.

2) Otherwise, take the most recent *.ogg from ~/.openclaw/media/inbound/.

Transcription

Default locale: macOS system locale.

Optional env:

  • YAP_LOCALE — override the transcription locale (e.g. it-IT, en-US).

Preferred:

  • yap transcribe --locale "${YAP_LOCALE:-}"
  • If YAP_LOCALE is not set, the helper script will use the macOS system locale (from defaults read -g AppleLocale).

If transcription fails or is empty: ask the user to repeat or send text.

Helper script:

  • scripts/transcribe_telegram_ogg.sh [path.ogg]

Reply behavior

Mode: voice (default)

Voice default: SYSTEM (uses the current macOS system voice). You can override by passing a specific voice name to the helper script.

1) Generate the reply text.

2) Convert reply text to an OGG/Opus voice note using:

  • scripts/tts_telegram_voice.sh "" [SYSTEM|VoiceName]

The script prints the generated .ogg path to stdout.

3) Send the .ogg back to Telegram as a voice note (not a generic audio file):

  • use the message tool with asVoice: true and media:
  • optionally set replyTo to thread the response

Notes:

  • Use SYSTEM to rely on the current macOS system voice (recommended).

Mode: text

Reply with a single text message:

  • Transcription: <...>
  • Reply: <...>

版本历史

共 1 个版本

  • v0.1.3 当前
    2026-03-28 21:22 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Gmail

byungkyu
Gmail API 集成,托管 OAuth,支持读取、发送和管理邮件、线程、标签及草稿,适用于需要与 Gmail 交互的场景。
★ 72 📥 37,726
communication-collaboration

Himalaya

lamelas
{"answer":"通过IMAP/SMTP管理邮件的CLI。可在终端使用 `himalaya` 收发、回复、转发、搜索及整理邮件。支持多账户与MML(MIME元语言)编写邮件。"}
★ 68 📥 45,585
communication-collaboration

Slack

steipete
当需要通过 slack 工具从 Clawdbot 控制 Slack 时使用,包括在频道或私信中回复消息或置顶/取消置顶项目。
★ 157 📥 47,678