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
قائمة اللغات المدعومة هنا.