# SpeechToTextButton Programmatic Control

The Kendo UI for Vue SpeechToTextButton exposes methods that let you control speech recognition from your application code through the component [`ref`](https://www.telerik.com/kendo-vue-ui-develop/components/buttons/api/speechtotextbuttonprops). 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 template ref, pass it to the SpeechToTextButton, and call the methods from your own controls.

```vue
<script setup>
import { ref } from 'vue';
import { Button as KButton, SpeechToTextButton } from '@progress/kendo-vue-buttons';

const sttButton = ref(null);
</script>

<template>
    <SpeechToTextButton ref="sttButton" />
    <KButton @click="sttButton.start()">Start Recognition</KButton>
</template>
```

The following example demonstrates how to create a `ref` for the SpeechToTextButton and use it to invoke the [`start()`](https://www.telerik.com/kendo-vue-ui-develop/components/buttons/api/speechtotextbuttonprops#start), [`stop()`](https://www.telerik.com/kendo-vue-ui-develop/components/buttons/api/speechtotextbuttonprops#stop), [`abort()`](https://www.telerik.com/kendo-vue-ui-develop/components/buttons/api/speechtotextbuttonprops#abort), and [`isActive()`](https://www.telerik.com/kendo-vue-ui-develop/components/buttons/api/speechtotextbuttonprops#isActive) methods.

[Demo Source](https://demos.telerik.com/kendo-vue-ui/buttons/speech-to-text/programmatic-control/source.txt)

## Suggested Links

* [SpeechToTextButton API Reference](https://www.telerik.com/kendo-vue-ui-develop/components/buttons/api/speechtotextbuttonprops)
* [SpeechToTextButton Events](https://www.telerik.com/kendo-vue-ui-develop/components/buttons/speech-to-text/events)
* [SpeechToTextButton Integration](https://www.telerik.com/kendo-vue-ui-develop/components/buttons/speech-to-text/integration)
* [SpeechToTextButton Configuration Options](https://www.telerik.com/kendo-vue-ui-develop/components/buttons/speech-to-text/speech-configs)
