Skip to main content
Representation of audio waveform data, used to pass audio data into the Inworld Runtime streams and to inworld runtime graph.

Implements

  • AudioChunkInterface

Constructor

new Audio(
    chunk: AudioChunkInterface
): Audio
Creates an Audio object.

Parameters

chunk (AudioChunkInterface) Low-level audio chunk containing waveform data and sample rate.

Returns

Audio Overrides: AbstractApiDataType.constructor

Properties

data

readonly data: number[]
PCM Float32 waveform samples. Values are typically normalized to the range [-1.0, 1.0]. Implementation of: AudioChunkInterface.data

sampleRate

readonly sampleRate: number
Sampling rate in hertz (Hz). Implementation of: AudioChunkInterface.sampleRate