Skip to main content

weaveAudio

weave


weave / weaveAudio

Function: weaveAudio()

weaveAudio(options): WeaveAudio

Defined in: media.ts:62

Create a new WeaveAudio object

Parameters

options

WeaveAudioInput

The options for this media type

  • data: The raw audio data as a Buffer
  • audioType: (Optional) The type of audio file, currently only 'wav' is supported

Returns

WeaveAudio

Example

const audioBuffer = fs.readFileSync('path/to/audio.wav');
const weaveAudio = weaveAudio({ data: audioBuffer });