π¦ ClawHub
Voice
by @polityang
Voice communication via Telegram. Automatically transcribes incoming voice messages using faster-whisper and replies with TTS voice. Use for all voice-relate...
TERMINAL
clawhub install telegram-voiceπ About This Skill
name: voice description: Voice communication via Telegram. Automatically transcribes incoming voice messages using faster-whisper and replies with TTS voice. Use for all voice-related interactions on Telegram.
Voice Communication
This skill enables voice communication on Telegram: 1. Receive: Transcribe voice messages using faster-whisper 2. Reply: Send voice replies using TTS
Incoming Voice (Automatic)
When receiving voice messages (.ogg files), use faster-whisper to transcribe:
from faster_whisper import WhisperModelmodel = WhisperModel('base', device='cpu', compute_type='int8')
segments, info = model.transcribe('', language='zh')
result = ''.join([s.text for s in segments])
Outgoing Voice (TTS)
Use the tts tool to send voice replies:
{
"action": "send",
"channel": "telegram",
"message": "",
"asVoice": true
}
Or use the tts tool directly:
{
"channel": "telegram",
"text": ""
}
Language
Requirements
pip install faster-whisper