Skip to main content

What is native mode

Native mode calls VOICEVOX CORE directly through PHP FFI via VOICEVOX Core for PHP. You can synthesize without running the official engine, but FFI and local core library setup are required.
Native mode is not meant for typical web-server deployment. Use local CLI. For FFI constraints, see PHP FFI.

Prerequisites

  1. Complete Installation and Configuration
  2. Complete VOICEVOX Core for PHP setup
  3. Set VOICEVOX_CORE_PATH in .env
VOICEVOX_CORE_PATH=/path/to/voicevox_core/

Basic usage

Use the talk() helper in native mode.
use function Revolution\Voicevox\talk;

$response = talk('Native mode sample', id: 1)
    ->generate(id: 1);

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

Style IDs

Use an id included in loaded .vvm models.
use function Revolution\Voicevox\talk;

$response = talk('I am Zundamon', id: 1)
    ->generate(id: 1);
Only models listed in core.vvms in config/voicevox.php are available.

Tune Audio Query with tap()

tap() works the same in native mode, but TalkAudioQuery is a different class than client mode.
use Revolution\Voicevox\Talk\TalkAudioQuery;
use function Revolution\Voicevox\talk;

$response = talk('Speak faster', id: 1)
    ->tap(function (TalkAudioQuery $talk) {
        $talk->audioQuery['speedScale'] = 1.2;
        $talk->audioQuery['pitchScale'] = 0.05;
        $talk->audioQuery['intonationScale'] = 1.5;
        $talk->audioQuery['volumeScale'] = 1.0;
    })
    ->generate(id: 1);
For the general tap() pattern, see tap() helper and Tappable trait. VOICEVOX for Laravel is a practical implementation example.

Use kana in AquesTalk-like notation

Native mode has no enable_katakana_english, so it is not ideal for reading raw English text directly. Instead, you can pass AquesTalk-like kana with kana().
use function Revolution\Voicevox\kana;

$response = kana("ネイティブ'バンナ/ノダ'", id: 1)
    ->generate(id: 1);

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

Difference from client mode

ItemClient TalkNative Talk
Engine processRequiredNot required
FFINot requiredRequired
Automatic English-to-katakanaAvailableNot available
Entry APIVoicevox::talk()talk()

Next pages

Native Song

Use singing models through FFI.

VOICEVOX Core for PHP

Review setup and constraints on the pure PHP wrapper side.
Last modified on May 21, 2026