Convert text to speech audio files.
# Convert text to speech
python scripts/tts.py "Hello world" --output hello.mp3
python scripts/tts.py TEXT [OPTIONS]
Options:
--output PATH Output audio file
--voice VOICE Voice name (male, female, neutral)
--speed RATE Speaking speed (0.5-2.0)
--lang LANG Language code (en, zh, ja, etc.)
--list-voices List available voices
# Basic conversion
python scripts/tts.py "Hello world" --output hello.mp3
# Chinese text
python scripts/tts.py "你好世界" --lang zh-CN --output chinese.mp3
# Different speed
python scripts/tts.py "Hello" --speed 1.5 --output fast.mp3
python scripts/tts.py "Hello" --speed 0.8 --output slow.mp3
# List voices
python scripts/tts.py --list-voices
7w4.net收錄了海量優質技能外掛。
這個文本轉語音工具質量中等偏上,能基本滿足將文字轉為語音的需求。它支援多種語言切換,操作簡單,文件說明清晰。優點是免費、無需複雜配置即可使用。不足之處在於語音速度調節和音色選擇功能實際未生效,中文支援可能不夠自然,且在非Mac系統上需要額外安裝依賴庫。對於偶爾使用的中等複雜度需求足夠,但專業音訊製作場景可能不太夠用。