Skip to main content
This guide shows how to use revolution/voicevox-core in the Muse Linux VM to turn Japanese text received in a chat into an audio file.
VOICEVOX Core supports Japanese speech synthesis only. The input text in this guide must be Japanese, so the examples keep their Japanese text as is.
ext-ffi is often disabled in web server environments, and this package is designed to run from the CLI. The Muse VM can also be recreated, so keep the files you need under your home directory.

Tested environment

This procedure was tested with the following combination.

Prepare a PHP build for FFI

The default PHP in Muse is built with static-php-cli, so it may not include ext-ffi. Instead of replacing the default PHP, extract a separate PHP 8.3 for FFI into your home directory.
Save the following wrapper as ~/workspace/tools/bin/php83-ffi.
Make it executable and confirm that FFI is enabled.
You are ready when class_exists("FFI") returns true.

Place the VOICEVOX Core files

The official downloader may not get through the Muse proxy, so download the parts the downloader would fetch one by one and place them in the same directory layout.

C API and ONNX Runtime

OpenJTalk dictionary and voice model

Pass --no-same-owner to tar, because Muse does not allow changing file ownership. The examples on this page use Zundamon’s style ID 3 (Normal), which is included in 0.vvm. VVM file numbers do not map one to one to speakers, so check the style ID to use in the VVM metadata.

Install the package

Run Composer with the FFI PHP as well.

Synthesize speech from Japanese text

Create zundamon.php. To make it easy to run from a Muse conversation, it takes the input text as the first argument and the output file as the second. Without arguments, it uses the sample text and zundamon.wav.
Set environment variables so the VOICEVOX Core libraries can be found at runtime.
To run it without arguments, use this command.
To change the text and output path from a Muse conversation, pass them as arguments.
For other APIs, such as frame-by-frame PCM generation with render(), see Usage and the API Reference.

Results and notes

On a shared-CPU Muse VM, the example above generated a WAV of about 7.67 seconds (24 kHz / 16 bit / mono). Processing took about 9 seconds.
  • The Muse VM can be recreated, so keep PHP and the libraries in a persistent location such as ~/workspace/.
  • This package is CLI only. To run it from a web server, plan the ext-ffi settings and the PHP binary setup separately.
  • The terms of use of VOICEVOX and each voice library apply to the generated audio. When you use Zundamon, you must credit it as VOICEVOX:ずんだもん.
Last modified on November 22, 2026