Guides
Using Speech
Practical browser speech setup, transcript handling, and unsupported-environment expectations.
Need the shortest path?
Use Quick Start when you want the smallest working route → scan → graph → run flow first.
Something feels off?
Inspect scan output, graph state, active route/context, and dispatch in a practical order.
Need the full surface?
Browse all runtime methods, hooks, extension points, and lifecycle APIs.
Use browser speech as an input layer over the same runtime pipeline used by text commands.
Start listening
const result = await Cinder.listen({
root: document,
autoRun: true,
speakFeedback: false,
});
console.log(result);Stop listening
Cinder.stopListening();Handle transcripts and errors explicitly
Cinder.onTranscript((event) => console.log(event));
Cinder.onSpeechError((error) => console.error(error));When to disable auto-run
Use autoRun: false when you want to:
- inspect transcripts before execution
- build your own voice UX layer
- confirm transcript quality in a noisy environment
Server-side fallback for browsers with no Web Speech API
Firefox and older Safari have no native SpeechRecognition at all. Set speech.engine: "auto" and configure the same ai.endpoint/ai.apiKey already used for text tier-3 fallback, and the runtime automatically records audio and uploads it for transcription instead - no separate speech-specific config:
await Cinder.init({
speech: { engine: 'auto', lang: 'en-US' },
ai: {
enabled: true,
mode: 'hybrid',
endpoint: 'https://your-fallback-host/v1/llm/infer',
apiKey: '',
},
});This only activates when the browser itself has no native SpeechRecognition - a browser that supports Web Speech natively always uses that first. It needs a server implementing a sibling /v1/speech/transcribe route behind that same endpoint, with a transcription provider configured (OpenAI Whisper).
Cinder Relay does not implement speech transcription today - this path is documented for the underlying mechanism, but there is currently no publicly available server offering it.
Unlike native SpeechRecognition, the server-side path can't stream a partial transcript while the user is still speaking - there's a transcript only once recording stops and the upload finishes. That's an honest UX difference, not a bug.
Honest expectation
With speech.engine: "browser" (or no fallback endpoint configured at all), unsupported cases fail clearly and leave text commands fully usable.
Related pages
Continue reading
Previous: Binding Actions
Use bindings when resolved intents should trigger explicit application logic instead of relying only on standard DOM execution.
Next: Debugging
Inspect scan results, graph state, active route/context, resolved intents, dispatch output, and fallback telemetry in a practical order.