What is client mode
Client mode generates audio by sending HTTP requests to the official VOICEVOX engine. No FFI is required, so this is the easiest mode to start with.If you have not set up the package yet, start with Installation and Configuration.
Prerequisites
1
Start official engine
2
Set URL only if needed
Basic usage
Style ID usage
You can pass style IDs to bothtalk() and generate().
talk(id:): style used foraudio_querygenerate(id:): style used for synthesis
speakers().
Tune Audio Query with tap()
This package exposes TalkAudioQuery before generate(), so tap() cleanly injects side effects only.
Automatic katakana conversion for English
In client mode,enable_katakana_english is enabled, so text with English words can be auto-converted toward katakana.
false as the third argument.
Save response
Streaming synthesis
Call/streaming_synthesis on VOICEVOX Engine 0.26.0 or later with streamingSynthesis(). Only styles of type streaming_talk are supported. It returns the WAV as a binary string.
startOffset is where the audio starts and segmentLength is how much audio to synthesize at a time, both in seconds.
Next pages
Client Song
Build singing synthesis with
Score and Note.VOICEVOX Core for PHP
Check pure PHP core usage before moving deeper into FFI flows.