tetos
0.4.1
อินเทอร์เฟซแบบครบวงจรสำหรับผู้ให้บริการข้อความหลายข้อความ (TTS)
ผู้ให้บริการ | ความต้องการ |
---|---|
Edge-TTS | - |
Openai TTS | api_key : คีย์ OpenAI API |
Azure TTS | speech_key : คีย์บริการ Azure Speechspeech_region : Azure Speech Service Region |
Google TTS | เปิดใช้งาน API ข้อความเป็นคำพูดในคอนโซล Google Cloud ตั้งค่า env var GOOGLE_APPLICATION_CREDENTIALS เป็นพา ธ ไปยังไฟล์คีย์บัญชีบริการ |
Volcengine TTS (火山引擎) | access_key : รหัสคีย์การเข้าถึง Volcengine (รับที่นี่)secret_key : Volcengine Access Secret Key (รับที่นี่)app_key : ปุ่มแอพ Volcengine |
Baidu TTS | api_key : คีย์ baidu apisecret_key : Baidu Secret Keyทั้งสองสามารถซื้อได้ที่คอนโซล |
Minimax TTS | api_key : คีย์ Minimax APIgroup_id : ID กลุ่ม Minimaxสามารถรับได้ทั้งสองที่คอนโซล Minimax |
迅飞 tts | app_id : รหัสแอป Xunfeiapi_key : ปุ่ม XUNFEI APIapi_secret : XUNFEI API Secret |
เสียงปลา | api_key : คีย์ AUDIO AUDIO 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