Using Audio Capture Component for Mic Capture

Sep 3, 2021.Knowledge
Article written by Anna L.

What is Audio Capture Component?

The Audio Capture Component offers a method of capturing mic input during gameplay. When activated, it will retrieve and play back mic input within the level. It inherits from USynthComponent, and as such behaves similarly to the Audio Component many have more experience with. This means techniques such as spatialization, bus and Submix sends, concurrency, and effects all work on Audio Capture Components with the same workflow you would use for a standard Audio Component.

Do I want to use Audio Capture Component?

Audio Capture Component is designed for single player and local multiplayer only. In other words, it is not sufficiently optimized for networked multiplayer techniques like voice chat. We do, however, have some other systems designed specifically for networked audio, such as EOS Voice.

Audio Capture Component is also intended to run within your game. If you are attempting to do something like record mic input for the purpose of making UAssets for your game, it may be an easier workflow to use a tool such as Sequencer’s Take Recorder, which can use microphone input as a source.

For recording sound happening within your game (as opposed to from an external source like a microphone), Submix Recording is often the easiest way to go. Instructions for a basic Submix Recording setup are described in the Adjustments section of this article, but the same technique can be used for any Submix audio.

Quick Start

  • Ensure that the Audio Capture Plugin is enabled. You will also need to verify the Audio Mixer is enabled (it is enabled by default starting at 4.25)
  • Put an actor in the level
  • Add a Audio Capture Component to the actor
  • Set “auto-activate” to true on the Audio Capture Component
  • Play the game, and talk into the microphone - you should now be able to hear your voice

Adjustments

  • If you don’t want audio capture to be constant during your game, you can uncheck the auto-activate setting, and use the Blueprint functions “Start” and “Stop” on the Audio Capture Component to enable and disable the mic capture.
  • If you don’t want the audio capture to be immediately audibly played backed to the user, you can uncheck “Enable Base Submix” on your Audio Capture Component (on 4.26 and later) or check “Output to Bus Only” (on 4.25 and earlier), and set up a bus send to an Audio Bus object.
  • For recording the output of the mic capture for future playback, Submix Recording is recommended. To do this, set the desired Submix to either the Base Submix of the Audio Capture Component, or as a Submix Send. You can then use the Blueprint functions “Start Recording Output” and “Finish Recording Output,” with the desired Submix as the “Submix to Record” parameter, to record and export the captured mic data as either a Sound Wave object or a Wav file. You can find more information on Submix Recording in the “Recording Submix Audio in a Blueprint” section of this article.

UE VERSION
4.25, 4.24, 4.23, 4.22, 4.21, 4.20, 4.19, 4.26

5 Likes

This option doesn’t exist

1 Like


Just search for it.

I have tried to use your “Quick Start” guide.
However, I wasn’t able to hear myself.
I have tried to bind “On Audio Envelope Value” to see any output as float, but nothing (float value 0.0, while debugging).

I saw some articles about enabling [Voice] in DefaultEngine.ini project config (did not help either).

I tried to use released 5.0.3 version, then I tried one I build by myself (from sourcecode) with no avail.

I am on Ubuntu 22.04, what config do I need so Unreal recognize my Mic input ?
(Pulseaudio don’t see any new application with Unreal start.)

I am also on Ubuntu 22.04 and cannot get audio capture to work at all.

I have added the AudioCapture component to an actor, always enabled. I have added the [Voice] section to the .ini file. I have tried on 5.0.3 and 5.1.0_preview2.

The troubling output is:

LogAudioCaptureCore: Display: No Audio Capture implementations found. Audio input will be silent.

I’m not really sure how to move forward with this. The check is here:
https://github.com/EpicGames/UnrealEngine/blob/c3caf7b6bf12ae4c8e09b606f10a09776b4d1f38/Engine/Source/Runtime/AudioCaptureCore/Private/AudioCaptureInternal.h#L33-L47

But I’m out of my depth understanding what is in the ModularFeaturesMap and how it gets populated on a given operating system.

1 Like

I can’t get this to work either on Mac OS 12.6, ARM. Have tried to add an AudioCapture component as above—I also tried enabling the take recorder and adding a microphone input, but in the output log I get the following on record:

LogTakesCore: Error: Microphone Audio Source could not start. Please check that the AudioCapture plugin is enabled

The plugin is enabled, however. I’ve tried with 5.0.3/5.1 preview 2 binaries, and 5.1 arm built from source.

1 Like

Quick update on this: if I build a project, and edit the project’s .plist per this thread , then when I open the project build it properly asks for microphone permission and AudioCapture works correctly. I never get this system request for mic permission when playing in editor.

OK, I think, it is time to create a bug report for this AudioCapture component, after i can see i am not alone.

The same thing is happening to me when I export to linux and android… unfortunately the audio component seems to only work on windows.
It doesn’t work on linux, nor on any android emulator.
And I see that it doesn’t work on IOS either
It seems that this component lacks quite a bit of work.
In my case I am testing on emulators, but it doesn’t work on any of them.
And I can say that the emulators take the microphone, because if I download an APP from the playstore to record voice, it works perfectly.
The audio component does not activate the microphone on Android.
and it doesn’t work on linux with Steam.

1 Like

Can you submit bug report, too. With this video, too ?
More reports bigger the chance of a fix.

Yes, I will have to.

1 Like

I found the solution and wrote it in this post.
For AudioComponent to work on Android, you have to give it permissions from Android.
I leave the link.

if uncheck “Enable Base Submix”,i cant hear my voice,but i start record wav also no voice,
how can i normal record my mic voice ,but i need not hear my voice