Piper TTS plugin for Unreal via simple CLI wrapper.
-
Grab latest release and extract plugins folder into your project root folder.
-
Download and extract
PiperWin64-2023.11.14-2.7z
link intoThirdParty/Piper/
in yourPiperCli-Unreal
plugin root folder. -
Download voice model from https://huggingface.co/rhasspy/piper-voices/tree/v1.0.0 e.g. for https://huggingface.co/rhasspy/piper-voices/tree/v1.0.0/en/en_US/joe/medium place
en_US-joe-medium.onnx
anden_US-joe-medium.onnx.json
in yourPiperCLI-Unreal/ThirdParty/Piper/Win64/model/
folder. -
Start your unreal project
-
Add
Piper
component to your actor of choice. EditPiperParams
modelmodel/en_US-joe-medium.onnx
v0.3
- Subscribe to
OnOutputBytes(Piper)
and convert your sound data from PCM to WAV to Unreal SoundWave using e.g. SocketIOClient Plugin's core utility functions https://github.com/getnamo/SocketIOClient-Unreal/blob/master/Source/CoreUtility/Public/CUBlueprintLibrary.h#L90.
v0.4
-
Subscribe to
OnAudioGenerated
which outputUSoundWave*
outputs instead of PCM bytes. -
Play SoundWave. Optionally use
USoundWaveQueueComponent
to queue up all the soundwaves being generated faster than real-time and play them back at target world location in sequence.