audio-classification with MMS and Wav2Vec2 in https://github.com/xenova/transformers.js/pull/220. Example usage:
// npm i @xenova/transformers
import { pipeline } from '@xenova/transformers';
// Create audio classification pipeline
let classifier = await pipeline('audio-classification', 'Xenova/mms-lid-4017');
// Run inference
let url = 'https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jeanNL.wav';
let output = await classifier(url);
// [
// { label: 'fra', score: 0.9995712041854858 },
// { label: 'hat', score: 0.00003788191679632291 },
// { label: 'lin', score: 0.00002646935718075838 },
// { label: 'hun', score: 0.000015628289474989288 },
// { label: 'bre', score: 0.000007014674793026643 }
// ]
automatic-speech-recognition for Wav2Vec2 models in https://github.com/xenova/transformers.js/pull/220 (MMS coming soon).Full Changelog: https://github.com/xenova/transformers.js/compare/2.5.1...2.5.2
Fetched April 7, 2026