Third-Party Voice Delivery Reference
This skill now keeps third-party integration outside tts.sh.
Recommended flow:
- Use
tts.sh speakto generate voice audio inopus(oroggalias). - Upload/send the generated file with each platform's official API.
1) Generate voice audio
# Opus output
bash skills/tts/scripts/tts.sh speak -t "Hello world" --format opus -o voice.opus
2) Integrate by platform
Feishu (Lark)
- Upload file:
im/v1/files(file_type=opus) - Send message:
im/v1/messages(msg_type=audio) - Docs:
- Upload file:
Telegram
- Send voice directly via
sendVoicewith multipartvoice=@voice.opus(or.ogg) - Docs:
- Send voice directly via
Discord
- Voice message flow:
- Request attachment slot (
POST /channels/{channel.id}/attachments) - Upload file to returned
upload_url - Create message with voice flags/attachment metadata (
POST /channels/{channel.id}/messages)
- Request attachment slot (
- Docs:
- Voice message flow:
Notes
- If your downstream API requires
audio/ogg, you can still send theopus-encoded output file with MIMEaudio/ogg. - Keep auth/token handling in your integration layer (service, bot, workflow tool), not in the core TTS script.