?token=YOUR_TOKEN
Whisper
VAD-filtered recording with batch transcription
Transcript
Developer
Import WhisperClient into your own app — no build step required.
import { WhisperClient } from '/whisper-client.js';
// Create a client
const client = new WhisperClient({
server: window.location.origin, // default: same origin
token: 'your-hypha-token', // optional
model: 'small', // tiny | base | small | medium | large-v3
});
// Option A: Record from microphone with VAD
client.onChunkUploaded = (info) => console.log(info.chunks, info.totalBytes);
await client.startRecording();
const result = await client.stopRecording();
console.log(result.text);
// Option B: Transcribe an audio file directly
const result2 = await client.transcribe(audioBlob);
// Cleanup when done
client.destroy();
TypeScript types: /whisper-client.d.ts