Remote voice control for Mac from mobile devices using commands like /callmac or /voice. Broadcast announcements, play alarms, tell stories, wake up kids - all triggered from Telegram/WhatsApp messages. Uses edge-tts with mixed Chinese/English support, local playback, loops, and volume control. | 从移动设备通过 /callmac 或 /voice 命令远程控制 Mac 语音功能。广播公告、播放闹钟、讲故事、叫孩子起床 - 全部通过 Telegram/WhatsApp 消息触发。使用 edge-tts 支持中英文混合、本地播放、循环播放和音量控制。
Remote voice control for your Mac from mobile devices. Broadcast announcements, play alarms, tell stories, wake up kids - all triggered from messaging apps like Telegram or WhatsApp. Uses edge-tts with mixed Chinese/English support.
从移动设备远程控制 Mac 语音功能。广播公告、播放闹钟、讲故事、叫孩子起床 - 全部通过 Telegram 或 WhatsApp 触发。使用 edge-tts 支持中英文混合。
快速开始使用语音技能,生成和播放中英文混合的 TTS 音频。
```bash
python3 scripts/generate_tts.py --text "Hello world" --play
python3 scripts/generate_tts.py --text "Hello 你好" --play
python3 scripts/generate_tts.py --text "Your message" --output announcement.mp3
```
Edge TTS provides high-quality neural voices:
Automatically detects language segments and uses appropriate voices:
1. User provides text to speak
2. System detects language(s)
3. Generates appropriate TTS audio
4. Plays locally on Mac
1. User provides Chinese/English mixed text
2. System splits by language segments
3. Generates separate audio for each language
4. Concatenates into single MP3 file
5. Optionally plays or saves
1. User provides text and playback schedule
2. System creates cron job or loop
3. Plays at specified intervals
4. Can be stopped on demand
Main script for TTS generation and playback.
**Usage:**
```bash
python3 generate_tts.py --text "Message" --play
python3 generate_tts.py --text "Message" --output file.mp3
python3 generate_tts.py --text "Hello 你好" --voice-en "en-US-AriaNeural" --voice-zh "zh-CN-XiaoyiNeural"
python3 generate_tts.py --text "Message" --play --loops 5
python3 generate_tts.py --text "Message" --play --volume 80
python3 generate_tts.py --ssml "<speak>Hello <break time='500ms'/> world</speak>"
```
**Parameters:**
Audio playback control utilities.
**Usage:**
```bash
python3 play_audio.py --file audio.mp3
python3 play_audio.py --file audio.mp3 --loops 3
python3 play_audio.py --file audio.mp3 --volume 75
python3 play_audio.py --stop
```
Merge multiple audio files.
**Usage:**
```bash
python3 merge_audio.py --files part1.mp3 part2.mp3 --output combined.mp3
python3 merge_audio.py --playlist playlist.txt --output combined.mp3
```
Complete list of available Edge TTS voices with language, gender, and style information.
Setup instructions for edge-tts and ffmpeg dependencies.
Example usage patterns and common scenarios.
1. **edge-tts**: `pip3 install edge-tts`
2. **ffmpeg**: `brew install ffmpeg` (for audio merging)
3. **macOS tools**: `afplay` (built-in), `osascript` (volume control)
```bash
python3 scripts/generate_tts.py --text "Welcome to the system. 系统欢迎您。" --play --voice-en "en-US-JennyNeural" --voice-zh "zh-CN-XiaoxiaoNeural"
```
```bash
python3 scripts/generate_tts.py --text "Time for your meeting. 会议时间到了。" --output reminder.mp3
echo "*/30 * * * * afplay /path/to/reminder.mp3" | crontab -
```
```bash
python3 scripts/generate_tts.py --text "Alert: System update in progress. 警报:系统更新进行中。" --play --loops 3 --volume 90
```
1. Check system volume: `osascript -e "output volume of (get volume settings)"`
2. Check mute status: `osascript -e "output muted of (get volume settings)"`
3. Test with simple audio: `afplay /System/Library/Sounds/Ping.aiff`
1. Verify installation: `python3 -m edge_tts --list-voices`
2. Check internet connection (edge-tts requires online access)
3. Update package: `pip3 install --upgrade edge-tts`
1. Use neural voices for best quality
2. Adjust speech rate if too fast/slow
3. Consider SSML for precise control
Leave a review
No reviews yet. Be the first to review this skill!