openfaas text to speech
1.0.0
อย่าลืมทำตามคำแนะนำใน FAAS repo เพื่อปรับใช้ FAAS Stack
รับ CLI
คุณสามารถติดตั้ง faas-cli ผ่าน brew install faas-cli หรือ curl -sSL https://get.openfaas.com | sudo sh .
สร้างและปรับใช้
สร้างและปรับใช้สแต็กของคุณโดยใช้คำสั่งต่อไปนี้:
$ faas-cli build -f text-to-speech.yml
$ faas-cli deploy -f text-to-speech.yml
ทดสอบ
การใช้ curl คุณสามารถส่งสตริงไปยังฟังก์ชั่นเพื่อสร้าง mp3 ของคำพูด:
$ curl http://localhost:8080/function/text-to-speech
-d 'This is a test of OpenFaaS text to speech!' > output.mp3
นอกจากนี้คุณสามารถเลือกส่วนหัว X-Language สำหรับภาษาอื่น:
$ curl http://localhost:8080/function/text-to-speech
-H 'X-Language: en-uk'
-d 'This is a test of OpenFaaS text to speech!' > output.mp3
รายการภาษาที่รองรับอยู่ที่นี่