composer require reactphp-x/tts -vvv
require __DIR__ . "/vendor/autoload.php";
use ReactphpX\Tts\Tts;
(new Tts(getenv('X_LIMIT') ?: 10, getenv('X_PUBLIC_PATH') ?: __DIR__ . '/public/'))->run();
X_LISTEN=0.0.0.0:8080 php tts.php
{ "text": "hello world", "voice": "zh-CN-shaanxi-XiaoniNeural" }
docker build -t reactphp-x-tts .
docker run -it --rm -p 8012:8080 -e X_LISTEN=0.0.0.0:8080 -e X_LIMIT=10 -e X_PUBLIC_PATH=/var/www/examples/public/ reactphp-x-tts php /var/www/examples/01.php
MIT