Skip to main content
Version: 1.x

Microphone Reader

Switch to scripting

The

MicrophoneReader

component class starts capturing audio input from attached microphones and sends audio packets to the ODIN runtime, which distributes them to the other peers joined in the same room.

This component is typically attached to the same game object as the Odin Handler. If you put this object on a different game object, make sure you attach it to the Microphone setting of the Odin Handler component.

Basic Settings

These are the settings exposed in the Unity Inspector for this component:

Microphone Reader Inspector

Properties

PropertyDescription
Redirect captured audioAutomatically send all captured audio data to all rooms this player joined. Disable this for more control.
Continue RecordingIndicates whether the recording should continue when the AudioClipLength is reached, wrapping around.

Mic Audio-Clip Settings

In this section, you can adjust various settings relevant for Audio Clip Management. In Unity, all audio is stored in an AudioClip. As Unity does not support real-time audio streams, ODIN modifies an AudioClip and overwrites it repeatedly once it comes to an end.

Use these settings to adjust these behaviors.

Properties

PropertyDescription
Audio Clip LengthThe length of the audio clip. If Continue Recording is enabled, this will be overwritten each time it's full.
Override Sample RateActivate this setting to specify a different sample rate than globally set in the Odin Editor Config.
Sample RateOnly visible if Override Sample Rate is active. Set the sample rate that you want for this microphone.
Autostart MicrophoneIf enabled, the microphone will immediately start listening and sending audio data to ODIN. If disabled, you need to call StartListen manually.