Skip to main content

Audio Files

For Whisper, a .wav file can be used to perform ASR on. A basic setup to record from the player's microphone and save as a .wav file is as follows:

  1. Right click the content browser and create a new Sound Submix. This will be for recording the player's microphone.
  2. Open the submix by double clicking it and drag off the output of the submix you created to create another Sound Submix.
  3. Set the output volume for this newly created submix to -96 dB to mute it.

Whisper Submix

  1. Create a new Actor Blueprint and add an Audio Capture Component to it.
  2. On the Audio Capture Component set the Base Submix to the first submix for recording you created.
  3. If you have not initialized Whisper in another blueprint, you can do it in this actor from Begin Play.
  4. Get the player controller and Enable Input on Begin Play
  5. Create a new variable of type Sound Submix and set it to the recording submix created earlier.
  6. Get the submix in the blueprint and use the node Bind Event to On Submix Recorded File Done.
  7. From the event either use Create Event or Custom Event to define what occurs after recording. (note: Do not use the generated event from the Events section on the submix variable)

Whisper Submix Event

  1. Get the keyboard event for the desired input. On Pressed, call Start on the Audio Capture Component followed by Start Recording Output on the Submix. On released, call Stop on the Audio Capture Component followed by Finish Recording Output on the Submix. Set the Export Type to Wav File and Name to the desired file name.

Whisper Audio Capture

  1. From the event created when the submix recording is finished, call the AsyncInfer Whisper node. Set File Name to the same file name as Finish Recording Output. Perform actions on the output as required.

Whisper Recording Done

  1. Create an instance of the blueprint in a level and press and hold the assigned button to record the microphone and release to transcribe the audio using Whisper.