reactphp-x / tts
v1.0.0
2024-08-10 02:20 UTC
Requires
- reactphp-x/asyncify: ^1.0
- reactphp-x/framework-x: ^0.16.0
This package is not auto-updated.
Last update: 2024-09-22 02:42:02 UTC
README
安装
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
API
GET /voices
POST 或 GET /tts
{ "text": "hello world", "voice": "zh-CN-shaanxi-XiaoniNeural" }
GET /voices/{voice}
docker
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