Function: fromFile()

fromFile(path, format?): Promise<Audio>

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

Parameters

path

string

format?

manually specify the file format; if not set, the format is guessed based on file extension

"wav" | "mp3" | "pcm16"

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.