openfaas text to speech
1.0.0
FAASリポジトリの指示に従って、FAASスタックを展開してください。
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
サポートされている言語のリストはこちらです。