Skip to main content

@storyteller-platform/mlx-audio

[node-swift] bindings for some of the models in mlx-audio-swift

This library is ESM only.

Current models supported are:

  • Wav2Vec2CTC

Also includes two novel model implementations:

Usage​

Download the model from our Gitlab repository.

import { loadModel, compute } from "@storyteller-platform/mlx-audio"

const model = await loadModel("path/to/unpacked/model")

const normalizedAudio = await readFile("path/to/audio.pcm")
const audio = new Float32Array(
normalizedAudio,
normalizedAudio.byteOffset,
normalizedAudio.length / 4,
)

const emissions = await compute(model, audio)

console.log(emissions)