Skip to main content
Skip table of contents

IRapportAudioInput

Description

The IRapportAudioInput interface provides a standardized way to send audio data to the Rapport web server. By implementing this interface, you can use a non-standard or custom audio input method with the Rapport system.

Namespace: SpeechGraphics.Rapport.Audio

Properties

Name

Type

Description

Frequency

int

The sample rate of the audio input, in Hertz (Hz).

SystemMute

Bool

A flag used internally by the Rapport system. When true, it indicates that the Rapport character is not in an interruptible state and is currently muting the audio input.

IsMuted

Bool

A read-only property that returns true if this audio input is muted by either the system (SystemMute) or another source.

Methods

Name

Type

Description

Update

void

This method is called internally by the system once per frame. Its purpose is to prepare and copy audio buffers so that the OnAudioRead() method can be safely called from an audio worker thread. Do not call this method externally.

OnAudioRead

void

Called internally from the audio thread to populate the audio buffer before sending it to the Rapport server. This method should not be called externally.

Parameters:

  • sampleOffset (int): The number of samples to offset from the beginning of the audio stream since the last time Update() was called.

  • buffer (float[]): The buffer array to which you should add your audio samples.

JavaScript errors detected

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

If this problem persists, please contact our support.