What to install
The package setup changes depending on which mode you want to run.- Client only
- Native / Engine API too
If you only connect to the official VOICEVOX engine over HTTP, you can start with
revolution/laravel-voicevox alone.Requirements
| Item | Value |
|---|---|
| PHP | 8.3+ |
| Laravel | 12+ |
| Required extension | ext-zip |
FFI ext-ffi | Required for native mode and engine API mode |
Setup steps
Install package(s)
Use Composer based on your target mode. Native mode and engine API mode also require VOICEVOX Core for PHP.
config/voicevox.php
For all keys and examples, see Configuration reference.
Minimum .env values
Client mode only
If you run the official engine athttp://127.0.0.1:50021, no extra values are required.
Native mode / Engine API
Prepare the
VOICEVOX_CORE_PATH directory by following VOICEVOX Core for PHP. That includes binary library files, OpenJTalk dictionary, and model files.Enable FFI
For CLI usage, FFI is typically available as-is. If you test Laravel engine API through a local web process, enable FFI inphp.ini.
Install engine resources
If you use resource endpoints such as/speaker_info and /singer_info, install additional resource files.
Mode entry points
Client Talk
Start text-to-speech with official VOICEVOX engine in Docker.
Client Song
Build singing synthesis with
Score and Note.Native Talk
Call VOICEVOX CORE directly through FFI.
Native Song
Use singing models and
sync() in native mode.