0% found this document useful (0 votes)
14 views

UnrealSGS

The Speech Generation System is a text-to-speech plugin that supports approximately 19 languages and 47 voice types, functioning offline in real time on Windows (x64). The document provides a quick start guide, API overview, and instructions for integrating the plugin into new products. For support or suggestions, users can contact the developers via email.

Uploaded by

larrosadamian215
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

UnrealSGS

The Speech Generation System is a text-to-speech plugin that supports approximately 19 languages and 47 voice types, functioning offline in real time on Windows (x64). The document provides a quick start guide, API overview, and instructions for integrating the plugin into new products. For support or suggestions, users can contact the developers via email.

Uploaded by

larrosadamian215
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

1

Speech Generation System

[email protected]

Speech Generation System


2

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

Speech Generation System


3

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

Speech Generation System


4

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;

● Write a text and press the Speak button.

Speech Generation System


5

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:

● FOnNewSound OnNewSound - the event is triggered when the text-to-audio


generation is finished. The event provides a USoundWave* object as a parameter.
This object is ready to play using the SpawnSound2D blueprint function, for example.

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 demo project UI and the SpeechGenerationSystem


settings..

Speech Generation System


7

usgs_demo. Initialization of the Speech Generation component and playing audio using the
SpawnSound2D blueprint function.

Speech Generation System


8

usgs_demo. Passing a text to convert to audio.

Speech Generation System


9

4. Using the plugin with a new product.

1. Create a new Blueprint Actor class named BP_SGS in your project.


2. Add the SGS component to the created blueprint.

3. Download the voice model files (*.onnx and *.json files);


4. Download the espeak-ng-data archive and extract it to the project folder
5. Select the created SGS component and fill in the fields:

6. Connect an Event BeginPlay node with the USgsComponent initialization node of


the SGS component for component initialization.

Speech Generation System


10

7. Bind an OnNewSound event with the Spawn Sound 2D node.

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.

Speech Generation System


11

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]

Speech Generation System

You might also like