What to install
VOICEVOX for Laravel varies in the additional packages and local setup required depending on the mode you use.- Client only
- Native / engine API
If you only need to connect to the official VOICEVOX engine over HTTP,
revolution/laravel-voicevox alone is enough.Requirements
Setup steps
1
Install the package
Install via Composer according to the mode you want. Native mode and the engine API also require VOICEVOX Core for PHP.
2
Publish the config file
3
Configure .env
For client mode only, set
VOICEVOX_URL. When using FFI, set VOICEVOX_CORE_PATH.4
Install engine resources if needed
Additional resources are required to use
/speaker_info or /singer_info.config/voicevox.php
You can review every setting in the configuration reference.
The minimum .env
Client mode only
If you run the official engine on the defaulthttp://127.0.0.1:50021, no additional configuration is needed.
Native mode / engine API
The contents of
VOICEVOX_CORE_PATH are prepared following the steps in VOICEVOX Core for PHP. Check there for placing the library itself, the OpenJTalk dictionary, and the model files.Enabling FFI
It usually works on the CLI out of the box. To start the Laravel-side engine API locally, enable FFI inphp.ini.
Installing engine resources
To use resource endpoints such as/speaker_info and /singer_info, install the resource files separately.
Mode entry points
Client Talk
Start the official VOICEVOX engine with Docker and synthesize text.
Client Song
Use
Score and Note to synthesize singing voices.Native Talk
Call VOICEVOX CORE directly with FFI.
Native Song
Learn where singing voice models and
sync() fit.