Skip to main content
Skip table of contents

Using a Custom Audio Source

If none of the existing sources fit your needs, then it is possible to create your own audio source using code.

All of the existing sources extend the same interface, IRapportAudioSource. The interface itself is fairly simple; it contains an event which can be used to broadcast audio data. When a reference to the audio source is passed to the Start call of the Rapport Session component, the session will automatically bind to this event so that whenever audio data is broadcast by the audio source, the data will received by the session and then sent to Rapport.

A breakdown of the steps required to create your own audio source:

  • Create your custom audio source class, making sure to inherit from IRapportAudioSource

  • Implement your custom audio input

  • Once you have the audio data that you would like to input to Rapport, broadcast the data using the RapportInputAudioAvailable event. NOTE: The broadcast audio data must be in Audio::TSampleBuffer<int16> format

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.