Sep 3, 2021.Knowledge
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.
- 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
- 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.
4.25, 4.24, 4.23, 4.22, 4.21, 4.20, 4.19, 4.26