edge tts go
v0.1.0
edge-tts-go เป็นโมดูล Golang ที่ให้คุณใช้บริการข้อความออนไลน์แบบใช้คำพูดออนไลน์ของ Microsoft Edge จากภายในรหัส Golang ของคุณหรือใช้คำสั่ง edge-tts-go ที่ให้มา
หากต้องการติดตั้งให้เรียกใช้คำสั่งต่อไปนี้:
$ go install github.com/surfaceyu/edge-tts-go
หากคุณต้องการใช้คำสั่ง edge-tts-go คุณสามารถเรียกใช้ได้ด้วยคำสั่งต่อไปนี้:
$ edge-tts-go --text "Hello, world!" --write-media hello.mp3
หากคุณต้องการเปลี่ยนภาษาของคำพูดหรือโดยทั่วไปเสียง
คุณต้องตรวจสอบเสียงที่มีอยู่ก่อนด้วยตัวเลือก --list-voices :
$ edge-tts-go --list-voices
Name: Microsoft Server Speech Text to Speech Voice (af-ZA, AdriNeural)
ShortName: af-ZA-AdriNeural
Gender: Female
Locale: af-ZA
Name: Microsoft Server Speech Text to Speech Voice (am-ET, MekdesNeural)
ShortName: am-ET-MekdesNeural
Gender: Female
Locale: am-ET
Name: Microsoft Server Speech Text to Speech Voice (ar-EG, SalmaNeural)
ShortName: ar-EG-SalmaNeural
Gender: Female
Locale: ar-EG
Name: Microsoft Server Speech Text to Speech Voice (ar-SA, ZariyahNeural)
ShortName: ar-SA-ZariyahNeural
Gender: Female
Locale: ar-SA
...
$ edge-tts-go --voice zh-CN-XiaoxiaoNeural --text "秦时明月汉时关,万里长征人未还" --write-media hello_in_chinese.mp3
เป็นไปได้ที่จะทำการเปลี่ยนแปลงเล็กน้อยกับคำพูดที่สร้างขึ้น
$ edge-tts-go --rate=-50% --text "Hello, world!" --write-media hello_with_rate_halved.mp3
$ edge-tts-go --volume=-50% --text "Hello, world!" --write-media hello_with_volume_halved.mp3
เป็นไปได้ที่จะใช้โมดูล edge-tts-go โดยตรงจาก GO สำหรับรายการแอปพลิเคชันตัวอย่าง: