flowspeech/flowspeech-php
Composer 安装命令:
composer require flowspeech/flowspeech-php
包简介
PHP client for the FlowSpeech text-to-speech API.
README 文档
README
PHP client for the FlowSpeech text-to-speech API.
FlowSpeech converts text into human-like audio with context-aware delivery, emotion control, pause control, and multi-speaker voice configuration. This package provides a small Composer-friendly client for the public FlowSpeech API surface.
Installation
composer require flowspeech/flowspeech-php
Authentication
Create a FlowSpeech API key in your account, then pass it as a Bearer token through the client:
use FlowSpeech\FlowSpeechClient; $client = new FlowSpeechClient(getenv('FLOWSPEECH_API_KEY'));
Do not commit real FlowSpeech API keys, provider keys, cookies, session tokens, or environment values.
Check Quota
$quota = $client->getQuota(); print_r($quota);
Generate Speech
$audio = $client->generateSpeech( 'Welcome to FlowSpeech. Generate natural speech from context-aware text.', [ ['voiceName' => 'Kore'], ], ); print_r($audio);
Multi-Speaker Speech
$audio = $client->generateMultiSpeakerSpeech( "Speaker A: We can make this sound natural.\nSpeaker B: Great, let's use different voices.", [ ['speaker' => 'Speaker A', 'voiceName' => 'Kore'], ['speaker' => 'Speaker B', 'voiceName' => 'Puck'], ], ); print_r($audio);
API Surface
This client targets the stable FlowSpeech API-key flow:
GET /api/ai/text-to-speech/quotaPOST /api/ai/text-to-speech
It intentionally avoids internal web-session routes and provider-specific compatibility routes.
License
MIT
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-13