A plugin for Unreal Engine that wraps Windows accessibility text-to-speech functionality.
Note that as of Unreal 5.0, there is an Experimental Text-to-Speech plugin included that is made by Epic. It supports Windows, Mac, Linux, iOS and Android. On Windows it uses Flite. I would recommend considering it instead of this plugin.
This project is aimed at adding text-to-speech for accessibility. It will only work on Windows PCs that have text-to-speech language packs already installed.
It is not suitable for general text-to-speech in games, e.g. "I want it to speak this text on all machines, because I want all players to hear the spoken voice." It will only work for players that have the text-to-speech language packs installed.
- Automatically read text under the cursor using UE4's built-in
GetAccessibleText()
. - Blueprint functions for creating
USoundWave
instances from text. - Settings for voice, speed, volume.
- Detects all installed voices.
- Can handle large amounts of text without hitches (runs asynchronously, splits up long sentences).
- Download the zip or clone the repository to
ProjectName/Plugins/BYGTextToSpeech
. - Add
BYGTextToSpeech
to.uproject
file - Add
BYGTextToSpeech
toPrivateDependencyModuleNames
insideProjectName.Build.cs
. - Install ATL dependencies through Visual Studio. Run the Visual Studio 2019
installer and under Individual Modules make sure that "C++ ATL for latest v142 build tools (x86 & x64) is checked".
Check the path in
BYGTextToSpeech.Build.cs
is pointing to where they are installed (see FAQ for details) - Make sure that you have voices installed on your PC. Under Windows settings search for Speech. At the bottom under Manage Voices ensure that you have voices installed for the languages you wish to use.
Global default settings are exposed under Project Settings > Plugins > BYG Text to Speech
.
UBYGTextToSpeechSubsystem* TextToSpeech = Cast<UBYGTextToSpeechSubsystem>( GetWorld()->GetSubsystemBase( UBYGTextToSpeechSubsystem::StaticClass() ) );
if ( TextToSpeech )
{
TextToSpeech->SetIsEnabled( true );
TextToSpeech->SetAutoReadOnHoverEnabled( true );
TextToSpeech->SetVolumeMultiplier( 1.0f );
TextToSpeech->SetSpeed( 1.0f );
}
Check the BYG Text to Speech category for functionality.
Most functionality is accessible through the BYG Text to Speech Subsystem.
- Windows only.
- Requires users to have voice packs installed for the language(s) they wish to use.
- Checked with 4.25 and 4.26.
- Compiles with 5.0EA but not tested, sorry!
It's possible that the AtlmfcFolder
variable inside
BYGTextToSpeech.Build.cs
is pointing to the wrong place.
To find where it is installed on your machine, search inside C:\Program Files (x86)\Microsoft Visual Studio\
for atlbase.h
. Then change the path inside BYGTextToSpeech.Build.cs
to match.
No, it only works on Windows, and only if the player has the text-to-speech language packs installed.
- Created and maintained by @_benui at Brace Yourself Games
- Please report bugs through GitHub