openfaas text to speech
1.0.0
请务必遵循FAAS存储库上的说明以部署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
支持语言的列表在这里。