PHPackages                             revolution/laravel-voicevox - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. revolution/laravel-voicevox

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

revolution/laravel-voicevox
===========================

VOICEVOX for Laravel

0.1.3(1mo ago)04MITPHP ^8.3

Since May 24Compare

[ Source](https://github.com/invokable/laravel-voicevox)[ Packagist](https://packagist.org/packages/revolution/laravel-voicevox)[ GitHub Sponsors](https://github.com/invokable)[ RSS](/packages/revolution-laravel-voicevox/feed)WikiDiscussions Synced 3w ago

READMEChangelog (1)Dependencies (18)Versions (5)Used By (0)

VOICEVOX for Laravel
====================

[](#voicevox-for-laravel)

[![tests](https://github.com/invokable/laravel-voicevox/actions/workflows/tests.yml/badge.svg)](https://github.com/invokable/laravel-voicevox/actions/workflows/tests.yml)[![linter](https://github.com/invokable/laravel-voicevox/actions/workflows/lint.yml/badge.svg)](https://github.com/invokable/laravel-voicevox/actions/workflows/lint.yml)[![Maintainability](https://camo.githubusercontent.com/1e45ed15540265b6e0bb468982751d7460d6371904bf9324969a8fb093ac3201/68747470733a2f2f716c74792e73682f6261646765732f63633665306565332d653232312d346330362d393062652d3466643837623739333130652f6d61696e7461696e6162696c6974792e737667)](https://qlty.sh/gh/invokable/projects/laravel-voicevox)[![Code Coverage](https://camo.githubusercontent.com/8ce0c62c13fa810685dcb74cc760cf174103bd2ebd5e792b006fa8b3a88d63bc/68747470733a2f2f716c74792e73682f6261646765732f63633665306565332d653232312d346330362d393062652d3466643837623739333130652f636f7665726167652e737667)](https://qlty.sh/gh/invokable/projects/laravel-voicevox)[![Ask DeepWiki](https://camo.githubusercontent.com/0f5ae213ac378635adeb5d7f13cef055ad2f7d9a47b36de7b1c67dbe09f609ca/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667)](https://deepwiki.com/invokable/laravel-voicevox)

Overview
--------

[](#overview)

This package brings [VOICEVOX](https://github.com/VOICEVOX), a Japanese TTS / singing synthesis ecosystem, to Laravel. You can use both client mode (official VOICEVOX Engine over HTTP) and native mode (direct synthesis through PHP FFI + VOICEVOX Core) with a 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.

FeatureSupportedDescriptionVOICEVOX Client✅Client for the official VOICEVOX Engine API. Works without FFI.VOICEVOX Core✅[voicevox-core-php](https://github.com/invokable/voicevox-core-php) wraps VOICEVOX Core dynamic libraries through FFI.Laravel style✅Uses a Laravel-friendly API for voicevox-core-php features.Laravel AI SDK Integration✅Supported from Laravel AI SDK Audio in both client and native modes.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
------------

[](#requirements)

- PHP 8.3+
- Laravel 12.x+
- FFI: Required for everything except client-only usage.

FFI is disabled on most web servers (including Laravel Cloud), so this package is mainly intended for **local CLI** usage.

In CLI it is typically enabled by default. If you run local web server processes for the Laravel Engine API, enable FFI in `php.ini`:

```
ffi.enable=true
```

Installation
------------

[](#installation)

Install both packages to use VOICEVOX Core features:

```
composer require revolution/laravel-voicevox revolution/voicevox-core-php
```

You can install only `laravel-voicevox` for client-only mode:

```
composer require revolution/laravel-voicevox
```

VOICEVOX Core Dynamic Library Setup
-----------------------------------

[](#voicevox-core-dynamic-library-setup)

To use FFI-based features, install VOICEVOX Core libraries by following the [voicevox-core-php README](https://github.com/invokable/voicevox-core-php/blob/main/README.md).

Configuration
-------------

[](#configuration)

Publish the package config file (`config/voicevox.php`):

```
php artisan vendor:publish --tag="voicevox-config"
```

For Core features, configure the path in `.env`:

```
VOICEVOX_CORE_PATH=/.../.local/voicevox_core/
```

Usage
-----

[](#usage)

### Client mode

[](#client-mode)

Use client mode through the **Voicevox** facade.

Client mode connects to the [official VOICEVOX Engine](https://github.com/VOICEVOX/voicevox_engine). Start it with Docker (GPU image is also available in supported environments):

```
docker pull voicevox/voicevox_engine:cpu-latest
docker run --rm -p '127.0.0.1:50021:50021' voicevox/voicevox_engine:cpu-latest
```

Text-to-speech. Client mode enables `enable_katakana_english`, so English words are automatically converted into katakana.

```
use Revolution\Voicevox\Voicevox;
use Revolution\Voicevox\Client\TalkAudioQuery;

$response = Voicevox::talk('Laravelが好きなのだ', id: 1)
    ->tap(function (TalkAudioQuery $talk): void {
        $talk->audioQuery['speedScale'] = 1.2;
    })->generate(id: 1);

$response->storeAs('client', 'talk.wav');
```

For singing synthesis, create a Score first. `length` is a **frame length** value, and `Note::len($ticks, $bpm)` helps MIDI-oriented workflows.

```
use Revolution\Voicevox\Song\Note;
use Revolution\Voicevox\Song\Score;
use Revolution\Voicevox\Voicevox;

$score = Score::make([
    Note::make(length: 15), // first note must be a rest
    Note::make(length: Note::len(ticks: 480, bpm: 120), lyric: 'ド', key: 60), // quarter note
    Note::make(length: Note::len(480, 120), lyric: 'レ', key: 62), // quarter note
    Note::make(length: Note::len(960, 120), lyric: 'ミ', key: 64), // half note
    Note::make(length: 2), // optional short tail silence
]);

$response = Voicevox::song($score, teacher: 6000)->generate(id: 3001);

$response->storeAs('client', 'song.wav');
```

### Native mode

[](#native-mode)

Use native mode through `talk()` / `song()` helper functions. Other than removing `Voicevox::`, usage is kept close to client mode.

Text-to-speech in native mode. Native mode does not provide `enable_katakana_english`, so for English text you may preprocess it (for example, convert to katakana with AI/LLM before synthesis). `TalkAudioQuery` has the same class name but is a different class from the client one.

```
use Revolution\Voicevox\Talk\TalkAudioQuery;
use function Revolution\Voicevox\talk;

$response = talk('ララベルが好きなのだ', id: 1)
    ->tap(function (TalkAudioQuery $talk): void {
        $talk->audioQuery['speedScale'] = 1.2;
    })->generate(id: 1);

$response->storeAs('native', 'talk.wav');
```

Singing synthesis in native mode. `Score` and `Note` are shared with client mode.

```
use Revolution\Voicevox\Song\Note;
use Revolution\Voicevox\Song\Score;
use function Revolution\Voicevox\song;

$score = Score::make([
    Note::make(length: 15), // first note must be a rest
    Note::make(length: Note::len(ticks: 480, bpm: 120), lyric: 'ド', key: 60),
    Note::make(length: Note::len(480, 120), lyric: 'レ', key: 62),
    Note::make(length: Note::len(960, 120), lyric: 'ミ', key: 64),
    Note::make(length: 2), // optional short tail silence
]);

$response = song($score, teacher: 6000)->generate(id: 3001);

$response->storeAs('native', 'song.wav');
```

Documentation
-------------

[](#documentation)

- [English](https://kawax.biz/en/packages/laravel-voicevox)
- [Japanese](https://kawax.biz/jp/packages/laravel-voicevox)

Terms of Use
------------

[](#terms-of-use)

You must follow the terms of use for VOICEVOX and each voice library.

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance90

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

4

Last Release

51d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/77618633?v=4)[Revolution](/maintainers/revolution)[@Revolution](https://github.com/Revolution)

---

Tags

laravellaravel-ai-sdkvoicevox

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/revolution-laravel-voicevox/health.svg)

```
[![Health](https://phpackages.com/badges/revolution-laravel-voicevox/health.svg)](https://phpackages.com/packages/revolution-laravel-voicevox)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[webcrafts-studio/lens-for-laravel

A local-first WCAG accessibility auditor for Laravel with axe-core, source mapping, CI workflows, and optional AI fixes.

452.8k](/packages/webcrafts-studio-lens-for-laravel)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
