Overview
revolution/laravel-voicevox is a package that brings VOICEVOX, a Japanese TTS / singing synthesis ecosystem, to Laravel. You can use client mode (HTTP requests to the official engine) and native mode (direct synthesis via PHP FFI with VOICEVOX Core for PHP) through a consistent Laravel-style API. Since VOICEVOX only supports Japanese, you must first translate the text from English to Japanese using an AI/LLM or similar tool before using this package for speech synthesis. VOICEVOX is widely used in Japan, and many well-known “Zundamon” voice clips are created with it.If you want FFI fundamentals first, see PHP FFI. For core library setup, see VOICEVOX Core for PHP and Usage.
Feature matrix
| Feature | Supported | Description |
|---|---|---|
| VOICEVOX Client | ✅ | Accesses the official VOICEVOX Engine API over HTTP. No FFI required. |
| VOICEVOX Core | ✅ | Uses VOICEVOX CORE dynamic libraries through VOICEVOX Core for PHP. |
| Laravel style | ✅ | Uses Facades, helpers, config/voicevox.php, and .env in a Laravel-friendly way. |
| Laravel AI SDK Integration | ✅ | Works with Laravel AI SDK Audio workflows. |
| VOICEVOX Engine | ⚠️ | Provides a VOICEVOX-compatible API inside Laravel, with fallback to the official engine for unsupported parts. |
| VOICEVOX Engine / OpenAI compatible TTS API | ✅ | /v1/audio/speech voice supports aliases such as “ずんだもん” in addition to style IDs, similar to the AI SDK. |
| VOICEVOX Editor | ⚠️ | I’ve developed a song-focused app for macOS, but I don’t plan to publish or distribute it on the App Store. If the code is ever released on GitHub, you can build and use it with Xcode. |
Requirements
- PHP 8.3+
- Laravel 12+
ext-zipext-ffifor native mode and engine API mode- Local CLI environment
Mode matrix
| Mode | Runtime | FFI | Main use case | Guide |
|---|---|---|---|---|
| Client Talk | HTTP requests to official engine | Not required | Text-to-speech | client-talk |
| Client Song | HTTP requests to official engine | Not required | Singing synthesis | client-song |
| Native Talk | Direct VOICEVOX CORE calls through FFI | Required | Local text-to-speech | native-talk |
| Native Song | Direct VOICEVOX CORE calls through FFI | Required | Local singing synthesis | native-song |
| Engine API | VOICEVOX-compatible API inside Laravel | Required | Embedded VOICEVOX-compatible API | installation |
Why tap() works well here
This package returns an Audio Query object right after talk() / song(), so you can insert a tuning step before generate().
That makes tap() a natural fit when you want to mutate query values without changing the return value.
- In Talk mode, adjust values like
speedScaleandpitchScale. - In Song mode, run
sync()to recalculate F0 and volume. - Keep clean chaining to
VoicevoxResponsefromgenerate().
For the core concept, see tap() helper and Tappable trait. This package is one of the most practical examples.
Documentation
Installation
Review client-only setup, FFI-enabled setup, config publishing, and engine resource preparation.
Client Talk
Start text-to-speech with the official VOICEVOX engine.
Client Song
Build singing synthesis with
Score and Note.Native Talk
Synthesize locally with PHP FFI and VOICEVOX CORE.
Native Song
Use singing models directly through FFI.
VOICEVOX Core for PHP
Check core library setup and pure PHP usage.
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