flowspeech / flowspeech-php
PHP client for the FlowSpeech text-to-speech API.
Package info
github.com/waeckerlinfederowicz66-sketch/flowspeech-php
pkg:composer/flowspeech/flowspeech-php
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^10.5 || ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-13 10:36:14 UTC
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