Overview
revolution/laravel-voicevox is a package for working with VOICEVOX from Laravel. You can use both the client mode, which connects to the official engine over HTTP, and the native mode, which synthesizes directly through PHP FFI in combination with VOICEVOX Core for PHP — all with the same Laravel-native style.If you’d like a primer on FFI first, see PHP FFI. For setting up the core library itself, see VOICEVOX Core for PHP and usage.
Feature matrix
Requirements
- PHP 8.3+
- Laravel 12+
ext-zipext-ffiwhen using native mode / the engine API- Local CLI environment
Mode list
Why tap() fits well
This package returns an Audio Query object right after talk() / song(), letting you insert an adjustment phase before generate().
tap() therefore reads naturally as “adjust the query without changing the return value”.
- For Talk, you can tweak
speedScale,pitchScale, and so on. - For Song, you can recompute F0 and volume with
sync(). - It chains cleanly into the
VoicevoxResponsethatgenerate()returns.
The idea behind
tap() itself is summarized in The tap() helper and the Tappable trait. This package is an especially clear practical example.Documentation
Installation
Client-only setup, FFI-based setup, publishing the config file, and preparing engine resources.
Client Talk
Get started with text-to-speech via the official VOICEVOX engine.
Client Song
Compose
Score and Note to synthesize singing voices.Native Talk
Synthesize locally with PHP FFI and VOICEVOX CORE.
Native Song
Use singing voice models directly through FFI.
VOICEVOX Core for PHP
Set up the core library and use it from pure PHP.
Reference links
- GitHub: invokable/laravel-voicevox
- VOICEVOX Core for PHP: /en/packages/voicevox-core-php
- VOICEVOX Core for PHP usage: /en/packages/voicevox-core-php/usage
- PHP FFI: /en/advanced/ffi
tap()helper: /en/advanced/tap- Official VOICEVOX engine: VOICEVOX/voicevox_engine