tetos
0.4.1
Antarmuka terpadu untuk beberapa penyedia teks-ke-speech (TTS).
| Penyedia | Persyaratan |
|---|---|
| Edge-tts | - |
| Openai tts | api_key : Kunci API OpenAI |
| Azure TTS | speech_key : Kunci Layanan Pidato Azurespeech_region : Wilayah Layanan Pidato Azure |
| Google TTS | Aktifkan API Teks-ke-Pidato di Google Cloud Console Setel Env var GOOGLE_APPLICATION_CREDENTIALS sebagai jalur ke file kunci akun layanan |
| Volcengine TTS (火山引擎) | access_key : ID kunci akses volcengine. (Dapatkan di sini)secret_key : Kunci Rahasia Akses Volcengine. (Dapatkan di sini)app_key : Kunci Aplikasi Volcengine |
| Baidu tts | api_key : Kunci API Baidusecret_key : Kunci rahasia BaiduKeduanya dapat diperoleh di konsol |
| Minimax tts | api_key : Kunci API Minimaxgroup_id : ID grup minimaxKeduanya dapat diperoleh di konsol minimax |
| 迅飞 tts | app_id : ID Aplikasi Xunfeiapi_key : Kunci API Xunfeiapi_secret : Xunfei API Secret |
| Audio Ikan | api_key : Kunci API Audio Ikan |
Tetos membutuhkan Python 3.8 atau lebih tinggi.
pip install tetos tetos PROVIDER [PROVIDER_OPTIONS] TEXT [--output FILE]
Harap jalankan tetos --help untuk penyedia dan opsi yang tersedia.
Contoh
tetos google "Hello, world!"
tetos azure "Hello, world!" --output output.mp3 # save to another file
tetos edge --lang zh-CN "你好,世界!" # specify language
tetos openai --voice echo "Hello, world!" # specify voice
Gunakan Azure TTS sebagai contoh:
from tetos . azure import AzureSpeaker
speaker = AzureSpeaker ( speech_key = '...' , speech_region = '...' )
speaker . say ( 'Hello, world!' , 'output.mp3' )Parameter inisialisasi mungkin berbeda untuk penyedia lain.
Tetos menghormati variabel lingkungan proxy HTTP_PROXY , HTTPS_PROXY , ALL_PROXY dan NO_PROXY .
Lisensi Apache 2.0