tetos
0.4.1
複数のテキスト対スピーチ(TTS)プロバイダーの統一インターフェイス。
プロバイダー | 要件 |
---|---|
edge-tts | - |
Openai TTS | api_key :OpenAI APIキー |
Azure TTS | speech_key :Azure Speech Serviceキーspeech_region :Azure Speech Service Region |
Google TTS | Google CloudコンソールでテキストからスピーチへのAPIを有効にします env var GOOGLE_APPLICATION_CREDENTIALS サービスアカウントキーファイルへのパスとして設定します |
VolcengineTTS(火山引擎) | access_key :Volcengine Access Key ID。 (ここで入手してください)secret_key :Volcengine Access Secret Key。 (ここで入手してください)app_key :Volcengine Appキー |
Baidu tts | api_key :Baidu APIキーsecret_key :Baidu Secret Key両方ともコンソールで取得できます |
Minimax TTS | api_key :Minimax APIキーgroup_id :Minimax Group IDどちらもMinimaxコンソールで取得できます |
迅飞TTS | app_id :xunfeiアプリIDapi_key :Xunfei APIキーapi_secret :Xunfei API Secret |
フィッシュオーディオ | api_key :フィッシュオーディオAPIキー |
TetosにはPython 3.8以降が必要です。
pip install tetos
tetos PROVIDER [PROVIDER_OPTIONS] TEXT [--output FILE]
tetos --help
利用可能なプロバイダーとオプションのためにヘルプ。
例
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
例としてAzure TTSを使用します。
from tetos . azure import AzureSpeaker
speaker = AzureSpeaker ( speech_key = '...' , speech_region = '...' )
speaker . say ( 'Hello, world!' , 'output.mp3' )
初期化パラメーターは、他のプロバイダーで異なる場合があります。
Tetosは、プロキシ環境変数HTTP_PROXY
、 HTTPS_PROXY
、 ALL_PROXY
およびNO_PROXY
を尊重します。
Apacheライセンス2.0