Example of Speech-to-Text in ASP.NET MVC AIAssistView Control

This sample demonstrates the integration of Speech-to-Text functionality with the AI AssistView component. It allows users to convert spoken input into text using the device's microphone and the browser's SpeechRecognition API, with responses powered by Azure OpenAI.

DEMO
SOURCE

In this example, the AI AssistView component is integrated with the SpeechToText component to enable voice-based interaction with Azure OpenAI service.

The sample demonstrates the following features:

  • The SpeechToText component captures voice input and transcribes it into text, which is then passed to the AI AssistView for generating contextual responses using Azure OpenAI.
  • The footerTemplate includes a content-editable area and a microphone button for initiating voice input.
  • The toolbarSettings adds a right-aligned Refresh button to clear previous prompts.
  • Responses are streamed dynamically using the addPromptResponse method for a real-time experience.
  • Markdown content in the response is rendered using the Marked plugin.
  • The promptSuggestions provides AI prompt suggestions to guide user interactions.
Transform your ASP.NET MVC web apps today with Syncfusion® ASP.NET MVC components
145+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE
opens in a new tab