audio

Table of contents

Classes

Interfaces

Functions

connect

connect(options?: { [key: string]: unknown; noiseVolume: number }): Connection

deprecated use the channel argument to Conversation.execute instead

Parameters:

NameType
options?object
options.noiseVolumenumber

Returns: Connection


fromBlob

fromBlob(blob: Blob): Promise<Audio>

Creates an Audio object from a Blob.

Parameters:

NameType
blobBlob

Returns: Promise<Audio>


fromFetchResponse

fromFetchResponse(response: Response): Promise<Audio>

Creates an Audio object from a Fetch API's Response object. Note that CustomTtsProvider callbacks can directly return a Response.

Parameters:

NameType
responseResponse

Returns: Promise<Audio>


fromFile

fromFile(path: string, format?: "mp3" | "wav" | "pcm16"): Promise<Audio>

Creates an Audio object from a file on a local filesystem. This function is only available in Node.js.

Parameters:

NameTypeDescription
pathstring-
format?"mp3" | "wav" | "pcm16"manually specify the file format; if not set, the format is guessed based on file extension

Returns: Promise<Audio>

Found a mistake? Let us know.

Enroll in beta

Request invite to our private Beta program for developers to join the waitlist. No spam, we promise.