- Docs for this.audio Global

Global

Methods

# createAudioFormatter(audioInput) → {AudioFormatterNode|AudioFormatterBrowser}

Creates an instance of the appropriate AudioFormatter (Node or Browser) based on the environment and input type.
Parameters:
Name Type Description
audioInput string | Blob The path to the audio file or the audio Blob/URL.

View Source createAudioFormatter.js, line 68

If the environment is unsupported or the input type is invalid.
Error
An instance of the appropriate AudioFormatter.
AudioFormatterNode | AudioFormatterBrowser

# isBlob(input) → {boolean}

Checks if the provided input is a Blob.
Parameters:
Name Type Description
input any The input to check.

View Source createAudioFormatter.js, line 56

- True if the input is a Blob, false otherwise.
boolean

# isBrowser() → {boolean}

Checks if the current runtime environment is a browser.

View Source createAudioFormatter.js, line 23

True if the environment is a browser, false otherwise.
boolean

# isNode() → {boolean}

Checks if the current runtime environment is Node.js.

View Source createAudioFormatter.js, line 15

True if the environment is Node.js, false otherwise.
boolean

# isPath(input) → {boolean}

Checks if the provided input is a valid path. This is a very basic check and might need to be more robust.
Parameters:
Name Type Description
input any The input to check.

View Source createAudioFormatter.js, line 33

- True if the input is a string, false otherwise.
boolean

# isURL(input) → {boolean}

Checks if the provided input is a valid URL.
Parameters:
Name Type Description
input any The input to check.

View Source createAudioFormatter.js, line 42

- True if the input is a valid URL, false otherwise.
boolean

# async thisAudio(audioFilePath) → {Promise.<Object>}

Asynchronously processes an audio file, returning structured data or an error object.
Parameters:
Name Type Description
audioFilePath string The path or URL to the audio file.

View Source this.audio.js, line 15

A promise that resolves to an object indicating success or failure, with data or an error message.
Promise.<Object>

Witness our Seal.
neurons.me