tetos
0.4.1
多個文本到語音(TTS)提供商的統一界面。
| 提供者 | 要求 |
|---|---|
| 邊緣-TT | - |
| Openai TTS | api_key :OpenAI API密鑰 |
| azure tts | speech_key :azure語音服務密鑰speech_region :Azure語音服務區域 |
| Google TTS | 在Google Cloud Console中啟用文本到語音API 設置env env var GOOGLE_APPLICATION_CREDENTIALS作為服務帳戶密鑰文件的路徑 |
| Volcengine TTS(火山引擎) | access_key :Volcengine Access密鑰ID。 (在這裡獲取)secret_key :Volcengine訪問Secret Key。 (在這裡獲取)app_key :volcengine應用程序密鑰 |
| 百度TT | api_key :BAIDU API密鑰secret_key :百度秘密鑰匙兩者都可以在控制台上獲取 |
| minimax tts | api_key :minimax api鍵group_id :minimax組ID兩者都可以在minimax控制台上獲取 |
| tts | app_id :xunfei應用程序IDapi_key :XUNFEI API密鑰api_secret :xunfei api秘密 |
| 魚音頻 | 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' )對於其他提供商,初始化參數可能不同。
TETO尊重代理環境變量HTTP_PROXY , HTTPS_PROXY , ALL_PROXY和NO_PROXY 。
Apache許可證2.0