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.Prerequisites
- Complete Installation and Configuration
- Complete VOICEVOX Core for PHP setup
- Set
VOICEVOX_CORE_PATHin.env
Basic usage
Use thetalk() helper in native mode.
Style IDs
Use anid included in loaded .vvm models.
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.
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 noenable_katakana_english, so it is not ideal for reading raw English text directly.
Instead, you can pass AquesTalk-like kana with kana().
Difference from client mode
| Item | Client Talk | Native Talk |
|---|---|---|
| Engine process | Required | Not required |
| FFI | Not required | Required |
| Automatic English-to-katakana | Available | Not available |
| Entry API | Voicevox::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.