waapi-text-to-speech
waapi-text-to-speech copied to clipboard
Wwise text-to-speech integration using external editors.
trafficstars
Text To Speech From Wwise
Overview
This samples demonstrates how to generate WAV files from a text-to-speech from Wwise directly.
Demonstrates:
- WAAPI ak.wwise.ui.getSelectedObjects
- WAAPI ak.wwise.core.audio.import
- Text to Speech using Windows Powershell
- Wwise External Tools
Requirements
- Node.js - Use the LTS version
- git
- Windows operating system
- Windows Powershell (comes with Windows 10)
Setup
It works best with Visual Studio Code. Run the following commands.
Install dependencies:
npm install
Build Typescript:
npm run build
Execution
First, ensure WAAPI is enabled in Wwise:
- menu Project/Preferences
- Check Enable Wwise Authoring API
- Click OK
- Restart Wwise
Then, open a Wwise Project.
Adding this script as an external editor
In Wwise:
- Open menu: Project > User Preferences
- In the External Editors, click Add...
- Browse for the
text-to-speech.cmdfile in this directory - Click OK
Executing
- Create a Sound Voice object
- Insert text in the Notes field
- Right-click the Sound Voice object, and use the external editor text-to-speech
How it works
The source code is located in index.ts.
This script is executed as an external editor in Wwise from the current selection. It will retrieve the selection from WAAPI 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.