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:
Name | Type |
---|---|
options? | object |
options.noiseVolume | number |
Returns: Connection
fromBlob
▸ fromBlob(blob
: Blob): Promise<Audio>
Parameters:
Name | Type |
---|---|
blob | Blob |
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:
Name | Type |
---|---|
response | Response |
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:
Name | Type | Description |
---|---|---|
path | string | - |
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? Email us, and we'll send you a free t-shirt!