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
- Node.js - Use the LTS version
- git
- Windows operating system
- Windows Powershell (comes with Windows 10)
It works best with Visual Studio Code. Run the following commands.
Install dependencies:
npm install
Build Typescript:
npm run build
First, ensure WAAPI is enabled in Wwise:
- menu Project/Preferences
- Check Enable Wwise Authoring API
- Click OK
- Restart Wwise
Then, open a Wwise Project.
In Wwise:
- Open menu: Project > User Preferences
- In the External Editors, click Add...
- Browse for the
text-to-speech.cmd
file in this directory - Click OK
- 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
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.