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
Setup steps
1
Install package(s)
Use Composer based on your target mode. Native mode and engine API mode also require VOICEVOX Core for PHP.
2
Publish config file
3
Set .env values
Use
VOICEVOX_URL for client mode. Add VOICEVOX_CORE_PATH when using FFI.4
Install engine resources when needed
Use this for endpoints such as
/speaker_info and /singer_info.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.