tetos
0.4.1
Eine einheitliche Schnittstelle für mehrere Anbieter mehrerer Text-zu-Sprache (TTS).
Anbieter | Anforderungen |
---|---|
Kanten-TTS | - - |
Openai TTS | api_key : OpenAI -API -Schlüssel |
Azure TTs | speech_key : Azure Speech Serviceschlüsselspeech_region : Azure Speech Service Region |
Google TTS | Aktivieren Sie die Text-zu-Sprach-API in der Google Cloud-Konsole Setzen Sie Env var GOOGLE_APPLICATION_CREDENTIALS als Pfad zur Servicestellschlüsseldatei |
Volcengine TTS (火山引擎) | access_key : Volcengine Access Key ID. (Holen Sie es sich hier)secret_key : Volcengine Access Secret Key. (Holen Sie es sich hier)app_key : Volcengine App -Schlüssel |
Baidu TTS | api_key : Baidu API -Schlüsselsecret_key : Baidu Secret KeyBeide können an der Konsole erworben werden |
Minimax TTS | api_key : Minimax -API -Schlüsselgroup_id : Minimax -Gruppen -IDBeide können an der Minimax -Konsole erworben werden |
迅飞 tts | app_id : Xunfei App IDapi_key : Xunfei API -Schlüsselapi_secret : Xunfei API Secret |
Fisch Audio | api_key : Fisch -Audio -API -Schlüssel |
Tetos benötigt Python 3.8 oder höher.
pip install tetos
tetos PROVIDER [PROVIDER_OPTIONS] TEXT [--output FILE]
Bitte führen Sie tetos --help
für verfügbare Anbieter und Optionen.
Beispiele
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
Verwenden Sie Azure TTS als Beispiel:
from tetos . azure import AzureSpeaker
speaker = AzureSpeaker ( speech_key = '...' , speech_region = '...' )
speaker . say ( 'Hello, world!' , 'output.mp3' )
Die Initialisierungsparameter können für andere Anbieter unterschiedlich sein.
Tetos respektiert die Proxy -Umgebungsvariablen HTTP_PROXY
, HTTPS_PROXY
, ALL_PROXY
und NO_PROXY
.
Apache -Lizenz 2.0