← 返回
沟通协作 Key 中文

Feishu Voice Loop

Accept text or voice input, transcribe if needed, generate natural OpenAI TTS speech, and send audio output to Feishu chat or web player.
接受文本或语音输入,必要时转录,生成自然的 OpenAI TTS 语音,并将音频输出发送到飞书聊天或网页播放器。
pengzhuowen
沟通协作 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 632
下载
💾 20
安装
1
版本
#audio#feishu#latest#openai#stt#tts#voice

概述

Feishu Voice Loop

Provide a reusable three-step voice loop for OpenClaw:

  1. accept text or voice input
  2. generate speech with OpenAI TTS
  3. return the audio to Feishu or a web player

When the input is voice, transcribe it to text first, then continue through the same output pipeline.

Quick start

Prerequisites:

  • OPENAI_API_KEY is set for TTS
  • Feishu app credentials exist in ~/.openclaw/openclaw.json under channels.feishu.appId/appSecret, or are passed explicitly
  • ffmpeg and ffprobe are installed and available
  • local audio transcription is configured in ~/.openclaw/openclaw.json under tools.media.audio.models

Main scripts:

  • scripts/openai_tts_feishu.py
  • scripts/transcribe_audio.py

Tasks

1. Transcribe voice input

Use this when you have a local .ogg, .opus, .wav, or similar file and want text.

python3 scripts/transcribe_audio.py /path/to/input.ogg

This script reuses the existing Whisper CLI configuration from ~/.openclaw/openclaw.json.

2. Generate and send voice output

Use this when you already have text and want to send a Feishu voice message.

python3 scripts/openai_tts_feishu.py \
  --to <feishu_open_id> \
  --text "这条是语音测试。" \
  --voice alloy \
  --model gpt-4o-mini-tts

The script will:

  1. call OpenAI audio/speech
  2. save WAV audio temporarily
  3. convert to Feishu-friendly Opus via ffmpeg
  4. upload the file to Feishu
  5. send an audio message to the target open_id

3. Run the full voice loop

Use this skill when the goal is a reusable voice interaction pipeline:

  1. transcribe input audio to text
  2. decide or generate the reply text
  3. synthesize reply audio with OpenAI TTS
  4. send the reply back to Feishu

Read references/input-output-workflow.md when building or explaining the end-to-end loop.

Default output style

Default preset is stored in references/presets.md.

Unless the user asks otherwise, use:

  • model: gpt-4o-mini-tts
  • voice: alloy
  • default style: 年轻日系男声感、温柔里带一点撩、贴耳边私聊感、自然、不播音腔

When the user asks for a different flavor, either:

  • pass a custom --instructions
  • or adapt one of the presets in references/presets.md

Handle failures

Common failure cases:

  • Missing OPENAI_API_KEY → ask for API key / env setup
  • HTTP 429 from OpenAI → billing or quota issue
  • missing Feishu app credentials → configure channels.feishu.appId/appSecret
  • missing ffmpeg or ffprobe → install locally before retrying
  • missing transcription model config → configure tools.media.audio.models

When OpenAI billing is not enabled, say so directly instead of pretending the voice was generated.

Packaging and sharing

Package with:

python3 /Users/zoepeng/.openclaw/lib/node_modules/openclaw/skills/skill-creator/scripts/package_skill.py \
  /Users/zoepeng/.openclaw/workspace/skills/openai-feishu-voice

The resulting .skill file can be shared or uploaded wherever the user distributes skills.

Resources

scripts/openai_tts_feishu.py

Use for deterministic TTS generation and Feishu delivery.

scripts/transcribe_audio.py

Use for deterministic local audio transcription via the configured Whisper CLI.

references/presets.md

Read when the user asks for a different voice direction or wants named presets.

references/input-output-workflow.md

Read when packaging or explaining the complete voice-in / voice-out solution.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 18:51 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

communication-collaboration

Himalaya

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

Gmail

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

imap-smtp-email

gzlicanyi
使用IMAP/SMTP读取和发送邮件;检查新/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持...
★ 114 📥 52,461