/UE4-Google-Speech-to-Text-Plugin

UE4 Google Speech Recognition Plugin

Primary LanguageC++

UE4-Google-Speech-to-Text-Plugin

UE4 Google Speech Recognition Plugin including Voice Capture Function.

Engine version and platform

Engine version: 4.25.4
Platform: Windows 10

Preparation

  1. Follow the instruction to set up a Cloud Console project and enable the Cloud Speech-to-Text API for that project.
  2. Create an API key
    Create an Api key

How to use

  1. Set Api Key

  1. Add Recording Component to your actor

  1. Record your speech and test your microphone

  1. Set recognition configuration and send your speech to google

  1. Enable exception for packaged builds

Go to your {ProjectName}.Target.cs and add this in the constructor:

bForceEnableExceptions = true;
bOverrideBuildEnvironment = true;

Tips

  • Speak no more than one minute each time.
  • Capture audio with a sampling rate of 16,000 Hz or higher. And smaller sample rate will help you get the result faster (In general, 16,000 Hz is enoough).
  • The SampleRate in GoogleSTTconfig should be identical with the Recording.
  • You can add words, phrases or class tokens to Speech Contexts to help Speech-to-Text recognize specific words or phrases more frequently than other options that might otherwise be suggested.
  • See more about config in documentation.

Thanks

CPP Rest SDK