recorder.onstop = async () => {
const blob = new Blob(chunks, { type: 'audio/webm' });
const text = await transcribe(blob);
showText(text);
};recorder.ondataavailable = (e) => socket.send(e.data);
recorder.start(250);
socket.onmessage = (e) => {
const msg = JSON.parse(e.data);
msg.final ? commitText(msg.text) : showPartial(msg.text);
};Sending small chunks over a socket gives partial results while the user speaks, instead of waiting for the whole recording.
They mean the same thing. ASR, automatic speech recognition, is the more technical name for converting speech to text.
Rare words are underrepresented in training data. Many STT APIs accept a list of key terms or a prompt with domain vocabulary to improve recognition.
Partial results are early guesses that can still change as more audio arrives. Final results are stable and should be used for logic and storage.