Having trouble getting help?
Contact Support
Contact Support
Events in ASP.NET CORE SpeechToText control
28 Apr 20252 minutes to read
This section describes the SpeechToText events that will be triggered when appropriate actions are performed. The following events are available in the SpeechToText control.
Name | Args | Description |
---|---|---|
created | - | Triggers when the SpeechToText control’s rendering is fully completed |
onStart | StartListeningEventArgs | Triggers when the speech recognition begins |
onStop | StopListeningEventArgs | Triggers when the speech recognition stops |
onError | ErrorEventArgs | Triggers when an error occurs during speech recognition or while listening. For list of possible errors, refer to the Error handling section |
transcriptChanged | TranscriptChangedEventArgs | Triggers when an transcription change occurs during the speech recognition |
The following example demonstrates how to configure the SpeechToText events.
@using Syncfusion.EJ2.Inputs
<div id='speechtotext-container'>
<ejs-speechtotext id="speech-to-text" created="onCreated" transcriptChanged="onTranscriptChanged" onStart="onListeningStart" onStop="onListeningStop" onError="onErrorHandler"></ejs-speechtotext>
</div>
<script>
function onTranscriptChanged(args) {
//your required action here
};
function onErrorHandler(args) {
//your required action here
};
function onListeningStart(args) {
//your required action here
};
function onListeningStop(args) {
//your required action here
};
function onCreated() {
//your required action here
};
</script>
public ActionResult Events()
{
return View();
}