Skip to main content

What to install

The package setup changes depending on which mode you want to run.
If you only connect to the official VOICEVOX engine over HTTP, you can start with revolution/laravel-voicevox alone.
composer require revolution/laravel-voicevox

Requirements

ItemValue
PHP8.3+
Laravel12+
Required extensionext-zip
FFI ext-ffiRequired for native mode and engine API mode
FFI is disabled on many web servers including Laravel Cloud. Test native mode and engine API mode on local CLI first.

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

php artisan vendor:publish --tag="voicevox-config"
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.
return [
    'client' => [
        'url' => env('VOICEVOX_URL', 'http://127.0.0.1:50021'),
        'core_version' => env('VOICEVOX_CLIENT_CORE_VERSION'),
    ],

    'core' => [
        'path' => env('VOICEVOX_CORE_PATH'),
        'dict' => env('VOICEVOX_CORE_DICT_PATH', 'dict/open_jtalk_dic_utf_8-1.11'),
        'models' => env('VOICEVOX_CORE_MODELS_PATH', 'models/vvms'),
        'vvms' => ['0.vvm', '9.vvm', 's0.vvm'],
    ],

    'engine' => [
        'disabled' => env('VOICEVOX_ENGINE_DISABLED', false),
        'fallback_url' => env('VOICEVOX_ENGINE_FALLBACK_URL', 'http://127.0.0.1:50021'),
    ],
];

Minimum .env values

Client mode only

If you run the official engine at http://127.0.0.1:50021, no extra values are required.
VOICEVOX_URL=http://127.0.0.1:50021

Native mode / Engine API

VOICEVOX_CORE_PATH=/path/to/voicevox_core/
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 in php.ini.
ffi.enable=true
For FFI details and constraints, see PHP FFI.

Install engine resources

If you use resource endpoints such as /speaker_info and /singer_info, install additional resource files.
php artisan voicevox:install
In Orchestra Testbench:
vendor/bin/testbench voicevox:install

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.
Last modified on May 22, 2026