UnrealSGS
UnrealSGS
Contents
1. About…………………………………………………………………………………………………….3
2. Quick start………………………………………………………………………………………………4
3. API overview……………………………………………………………………………………………5
4. Using the plugin with a new product………………………………………………………………….9
5. Contact us……………………………………………………………………………………………….10
1. About
The Speech Generation System is a plugin that provides text-to-speech conversion (using piper library.
MIT license).
Features:
● Converting text to speech in different languages (English, Deutsch, Spanish, Chinese and so on. ~19
languages).
● Ability to select different types of voices (~ 47 voices).
● It works offline, in real time.
Supported platforms:
● Windows (x64).
Links:
Download voices
2. Quick start
● Clone the demo repository;
● Download the voice model files (*.onnx and *.json files);
● Download the espeak-ng-data archive and extract it to the project folder;
● Install the Speech Generation System plugin;
● Run the project and set up the path to the espeak-ng-data folder, the speaker model file, and the
speaker model configuration file. Then press the Start button;
3. API overview
3.1 USgsComponent
Fields of class:
● FString ESpeakDataPath - path to speech synthesizer files folder;
● FString VoiceModelFPath - path to voice model file (*.onnx);
● FString VoiceConfigFPath - path to voice model configuration file (*.json);
● int32 SpeakerId - Speaker identifier in the multi-voice model.
Events of class:
Methods of class:
● bool Initialize() - the function of the component initialization;
● bool Deinitialize() - the function of the component deinitialization;
● void OnAudioFinished() – the method handler is triggered when the audio playing is
finished, and now the component is ready to convert the next text to audio.
● void Say(const FString& Text) – the handler method takes text as a parameter,
converts it into an audio file and plays it back using the AudioSource component.
Speech Generation System
6
usgs_demo. Initialization of the Speech Generation component and playing audio using the
SpawnSound2D blueprint function.
8. Add a TextToSpeech node and fill in ("hello world," for example) the Text field.
9. Put the created BP_SGS actor on the map and run a game session. You have to hear
the "Hello world" phrase.
5. Contact us
Do you meet issues while using this plugin?
Do you have suggestions on how to improve the API?
Feel free to contact us: [email protected]