Skip to main content

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

FeatureSupportedDescription
VOICEVOX ClientAccesses the official VOICEVOX Engine API over HTTP. No FFI required.
VOICEVOX CoreUses VOICEVOX CORE dynamic libraries through VOICEVOX Core for PHP.
Laravel styleUses Facades, helpers, config/voicevox.php, and .env in a Laravel-friendly way.
Laravel AI SDK IntegrationWorks 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-zip
  • ext-ffi for native mode and engine API mode
  • Local CLI environment
FFI is often disabled on standard web server environments (including Laravel Cloud). Treat native mode and engine API mode as local CLI-first features.

Mode matrix

ModeRuntimeFFIMain use caseGuide
Client TalkHTTP requests to official engineNot requiredText-to-speechclient-talk
Client SongHTTP requests to official engineNot requiredSinging synthesisclient-song
Native TalkDirect VOICEVOX CORE calls through FFIRequiredLocal text-to-speechnative-talk
Native SongDirect VOICEVOX CORE calls through FFIRequiredLocal singing synthesisnative-song
Engine APIVOICEVOX-compatible API inside LaravelRequiredEmbedded VOICEVOX-compatible APIinstallation

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.
use Revolution\Voicevox\Client\TalkAudioQuery;
use Revolution\Voicevox\Voicevox;

$response = Voicevox::talk('You can tune with tap()', id: 1)
    ->tap(function (TalkAudioQuery $talk) {
        $talk->audioQuery['speedScale'] = 1.2;
    })
    ->generate(id: 1);
  • In Talk mode, adjust values like speedScale and pitchScale.
  • In Song mode, run sync() to recalculate F0 and volume.
  • Keep clean chaining to VoicevoxResponse from generate().
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.
Last modified on May 26, 2026