Developer Documentation

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 to 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:


Redirect captured audioAutomatically send all captured audio data to all rooms this player joined. If you want more control, disable this setting.
Continue RecordingIndicates whether the recording should continue recording if AudioClipLength is reached, and wrap around and record from the beginning of the AudioClip.

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 just modifies an Audio Clip and overwrites it over and over again once it came to an end.

Use these settings to adjust these behaviors.


Audio Clip LengthThe length of the audio clip. If Continue Recording is enabled, this will be overwritten everytime 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 of Override Sample Rate is active. Set the sample rate that you want to have 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.