Walkie-Talkie Mode
This skill automates the voice-to-voice loop on WhatsApp using local transcription and local TTS.
Workflow
- 1. Incoming Audio: When a user sends an audio/ogg/opus file:
- Use
tools/transcribe_voice.sh to get the text.
- Process the text as a normal user prompt.
- 2. Outgoing Response:
- Instead of a text reply, generate speech using
bin/sherpa-onnx-tts.
- Send the resulting
.ogg file back to the user as a voice note.
Triggers
- - User sends an audio message.
- User says "activa modo walkie-talkie" or "hablemos por voz".
Constraints
- - Use local tools only (ffmpeg, whisper-cpp, sherpa-onnx-tts).
- Maintain a fast response time (RTF < 0.5).
- Always reply with BOTH text (for clarity) and audio.
Manual Execution (Internal)
To respond with voice manually:
bin/sherpa-onnx-tts /tmp/reply.ogg "Tu mensaje aquí"
Then send
/tmp/reply.ogg via
message tool with
filePath.
技能名称: 对讲机模式
详细描述:
对讲机模式
此技能利用本地转录和本地TTS,在WhatsApp上实现语音到语音的自动循环。
工作流程
- 1. 接收音频:当用户发送音频/ogg/opus文件时:
- 使用 tools/transcribe_voice.sh 获取文本。
- 将文本作为普通用户提示进行处理。
- 2. 发送回复:
- 不回复文本,而是使用 bin/sherpa-onnx-tts 生成语音。
- 将生成的 .ogg 文件作为语音消息发送回用户。
触发条件
- - 用户发送音频消息。
- 用户说“激活对讲机模式”或“我们用语音交流吧”。
约束条件
- - 仅使用本地工具(ffmpeg、whisper-cpp、sherpa-onnx-tts)。
- 保持快速响应时间(RTF < 0.5)。
- 始终同时回复文本(以便清晰)和音频。
手动执行(内部)
要手动回复语音:
bash
bin/sherpa-onnx-tts /tmp/reply.ogg 在此输入您的消息
然后通过 message 工具,使用 filePath 发送 /tmp/reply.ogg。