Models

Speech-to-text

k2-fsa/streaming-zipformer-en

Model ID
k2-fsa/streaming-zipformer-en
Type
Speech-to-text

Use this model

Stream microphone transcription in a web app

Install the browser SDK:

npm install @wfloat/wfloat-web

Load the streaming model, create a session, and let the SDK capture microphone audio:

import { loadSttModel } from "@wfloat/wfloat-web";
const stt = await loadSttModel("k2-fsa/streaming-zipformer-en");
const session = await stt.createSession();
await session.startMicrophone({
sampleRate: 16000,
onResult(partial) {
console.log(partial.text, partial.isEndpoint);
},
});
// Call these when the user stops recording.
await session.stopMicrophone();
const result = await session.finish();
console.log(result.text);
await session.close();

For an application-owned audio pipeline, use session.push({ audio, sampleRate }) and read partial results with session.getResult().