Binds VOICEVOX text to speech API to pure C# on Unity.
See also official page.
Support version is 0.14.3
.
- Query Creation
-
/audio_query
-
/audio_query_from_preset
-
- Query Editing
- Synthesis
-
/synthesis
-
/cancellable_synthesis
-
/multi_synthesis
-
/morphable_targets
-
/synthesis_morphing
-
- Otherwise
- Library
- User Dictionary
- Settings
Add dependencies:
{
"dependencies": {
"com.mochineko.voicevox-api": "https://github.com/mochi-neko/VOICEVOX-API-unity.git?path=/Assets/Mochineko/VOICEVOX_API#0.2.1",
"com.mochineko.relent": "https://github.com/mochi-neko/Relent.git?path=/Assets/Mochineko/Relent#0.2.0",
"com.mochineko.relent.extensions.newtonsoft-json": "https://github.com/mochi-neko/Relent.git?path=/Assets/Mochineko/Relent.Extensions/NewtonsofJson#0.2.0",
"com.unity.nuget.newtonsoft-json": "3.0.2",
"com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask",
...
}
}
to your mainfest.json
.
If you have already used Newtonsoft.Json on your project, remove dependency:"com.unity.nuget.newtonsoft-json": "3.0.2",
.
- Launch your VOICEVOX server or application.
- If you change VOICEVOX server address from default, you have to set
VoiceVoxBaseURL.BaseURL
. - Input text to synthesis speech.
- Create
AudioQuery
from text byQueryCreationAPI
. - Synthesize speech from
AudioQuery
bySynthesisAPI
. - Decode synthesized WAV file and play on Unity as you like.
- You can select how to decode WAV file on your project.
- In this sample, I use simple-audio-codec-unity I wrote.
A sample code with UniTask is this.
See CHANGELOG.
See NOTICE.
Licensed under the MIT license.