New to KendoReact? Start a free 30-day trial
SpeechToTextButton Programmatic Control
SpeechToTextButton Programmatic ControlPremium
Updated on Nov 6, 2026
The KendoReact SpeechToTextButton exposes methods that let you control speech recognition from your application code through the component ref. These methods allow you to start, stop, abort, and check the status of speech recognition operations from your application code.
To control speech recognition programmatically, create a ref with the SpeechToTextButtonHandle type, pass it to the SpeechToTextButton, and call the methods from your own controls.
tsx
const sttButtonRef = React.useRef<SpeechToTextButtonHandle | null>(null);
<SpeechToTextButton ref={sttButtonRef} />;
<Button onClick={() => sttButtonRef.current?.start()}>Start Recognition</Button>;
The following example demonstrates how to create a ref for the SpeechToTextButton and use it to invoke the start(), stop(), abort(), and isActive() methods.