Text To Speech From Wwise
Overview
This sample demonstrates how to generate WAV files using text-to-speech from Wwise directly.
Demonstrates:
- WAAPI ak.wwise.core.object.get
- WAAPI ak.wwise.core.audio.import
- Text to Speech using Windows Powershell and SpeechSynthesizer
- Wwise Command Add-ons
Requirements
- Wwise 2019.2.x or more recent
- Python 3.6 or more recent
- waapi-client python library
- Windows 10 and Windows Powershell
Setup
-
Install python 3.6 or more recent
-
Install python dependencies:
py -3 -m pip install waapi-client
-
Create the
Add-ons
folder under%APPDATA%\Audiokinetic\Wwise
-
Unzip the git repository under:
%APPDATA%\Audiokinetic\Wwise\Add-ons
Note: ensure the
Commands
andwaapi-text-to-speech
folders are directly located under theAdd-ons
folder. -
Restart Wwise or run the command Command Add-ons/Reload
How to use
- Create a Sound SFX or Sound Voice object in the project.
- Type some text in the Notes field.
- Right-click the object, and select Generate Text-to-Speech.
How it works
The source code is located in main.py.
This script is using WAAPI and the Command Add-ons system. It will retrieve the selection from executed command and generate a WAV file for each selected Sound objects using Windows text to speech. The WAV files will be automatically imported in the project with WAAPI.
Refer to this blog article for more information.