From 956a9e4e072b47a991fc4cea8bdd26c72eb0d391 Mon Sep 17 00:00:00 2001 From: KaviBharathi-SF5060 Date: Wed, 15 Oct 2025 16:40:06 +0530 Subject: [PATCH] 986985: updated the speech samples description --- .../ai-assistview/EJ2_ASP.MVC/speech/speech-to-text.md | 2 +- .../ai-assistview/EJ2_ASP.MVC/speech/text-to-speech.md | 2 +- .../ai-assistview/EJ2_ASP.NETCORE/speech/speech-to-text.md | 2 +- .../ai-assistview/EJ2_ASP.NETCORE/speech/text-to-speech.md | 2 +- .../code-snippet/ai-assistview/speech/tts/razor | 6 ++++++ .../code-snippet/ai-assistview/speech/tts/tagHelper | 7 ++++++- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.MVC/speech/speech-to-text.md b/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.MVC/speech/speech-to-text.md index 4de77f98ca..9f40bd899c 100644 --- a/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.MVC/speech/speech-to-text.md +++ b/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.MVC/speech/speech-to-text.md @@ -10,7 +10,7 @@ documentation: ug # Speech-to-Text in ASP.NET MVC AI AssistView -The Syncfusion ASP.NET MVC AI AssistView control supports `Speech-to-Text` functionality through the browser's [Web Speech API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API), enabling conversion of spoken words into text using the device's microphone. +The Syncfusion ASP.NET MVC AI AssistView control integrates `Speech-to-Text` functionality through the browser's [Web Speech API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API). This enables the conversion of spoken words into text using the device's microphone, allowing users to interact with the AI AssistView through voice input. ## Prerequisites diff --git a/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.MVC/speech/text-to-speech.md b/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.MVC/speech/text-to-speech.md index 394cb71033..5d895ee35c 100644 --- a/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.MVC/speech/text-to-speech.md +++ b/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.MVC/speech/text-to-speech.md @@ -10,7 +10,7 @@ documentation: ug # Text-to-Speech in ASP.NET MVC AI AssistView -The Syncfusion TypeScript AI AssistView component supports `Text-to-Speech` (TTS) functionality using the browser's Web Speech API specifically using the [SpeechSynthesisUtterance](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance) interface to convert AI-generated response into spoken audio. +The Syncfusion TypeScript AI AssistView control integrates `Text-to-Speech` (TTS) functionality using the browser's Web Speech API, specifically the [SpeechSynthesisUtterance](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance) interface. This allows AI-generated responses to be converted into spoken audio, enhancing accessibility and user interaction. ## Prerequisites diff --git a/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.NETCORE/speech/speech-to-text.md b/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.NETCORE/speech/speech-to-text.md index 0cc91748f4..5401f41fc3 100644 --- a/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.NETCORE/speech/speech-to-text.md +++ b/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.NETCORE/speech/speech-to-text.md @@ -10,7 +10,7 @@ documentation: ug # Speech-to-Text in ASP.NET Core AI AssistView -The Syncfusion ASP.NET Core AI AssistView control supports `Speech-to-Text` functionality through the browser's [Web Speech API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API), enabling conversion of spoken words into text using the device's microphone. +The Syncfusion ASP.NET Core AI AssistView control integrates `Speech-to-Text` functionality through the browser's [Web Speech API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Speech_API). This enables the conversion of spoken words into text using the device's microphone, allowing users to interact with the AI AssistView through voice input. ## Prerequisites diff --git a/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.NETCORE/speech/text-to-speech.md b/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.NETCORE/speech/text-to-speech.md index a5d6cd4c8a..5a1cff60c5 100644 --- a/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.NETCORE/speech/text-to-speech.md +++ b/ej2-asp-core-mvc/ai-assistview/EJ2_ASP.NETCORE/speech/text-to-speech.md @@ -10,7 +10,7 @@ documentation: ug # Text-to-Speech in ASP.NET Core AI AssistView -The Syncfusion TypeScript AI AssistView component supports `Text-to-Speech` (TTS) functionality using the browser's Web Speech API specifically using the [SpeechSynthesisUtterance](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance) interface to convert AI-generated response into spoken audio. +The Syncfusion TypeScript AI AssistView control integrates `Text-to-Speech` (TTS) functionality using the browser's Web Speech API, specifically the [SpeechSynthesisUtterance](https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisUtterance) interface. This allows AI-generated responses to be converted into spoken audio, enhancing accessibility and user interaction. ## Prerequisites diff --git a/ej2-asp-core-mvc/code-snippet/ai-assistview/speech/tts/razor b/ej2-asp-core-mvc/code-snippet/ai-assistview/speech/tts/razor index dd184a6dc8..e802edd179 100644 --- a/ej2-asp-core-mvc/code-snippet/ai-assistview/speech/tts/razor +++ b/ej2-asp-core-mvc/code-snippet/ai-assistview/speech/tts/razor @@ -29,10 +29,12 @@ var stopStreaming = false; var currentUtterance; + // Initializes the AIAssistView component reference when created function onCreated() { assistObj = ej.base.getComponent(document.getElementById("aiAssistView"), "aiassistview"); } + // Handles toolbar item clicks, such as clearing the conversation on refresh function toolbarItemClicked(args) { if (args.item.iconCss === 'e-icons e-refresh') { assistObj.prompts = []; @@ -40,6 +42,7 @@ } } + // Handles clicks on response toolbar items, such as copying, reading aloud, liking, or disliking the response function onResponseToolbarItemClicked(args) { const responseHtml = assistObj.prompts[args.dataIndex].response; if (responseHtml) { @@ -68,6 +71,7 @@ } } + // Streams the AI response character by character to create a typing effect async function streamResponse(response) { let lastResponse = ''; const responseUpdateRate = 10; @@ -85,6 +89,7 @@ } } + // Handles prompt requests by sending them to the server API endpoint and streaming the response function onPromptRequest(args) { // Get antiforgery token var tokenElement = document.querySelector('input[name="__RequestVerificationToken"]'); @@ -121,6 +126,7 @@ }); } + // Stops the ongoing streaming response function stopRespondingClick() { stopStreaming = true; } diff --git a/ej2-asp-core-mvc/code-snippet/ai-assistview/speech/tts/tagHelper b/ej2-asp-core-mvc/code-snippet/ai-assistview/speech/tts/tagHelper index fdfd26e68e..dd8f2ad3f9 100644 --- a/ej2-asp-core-mvc/code-snippet/ai-assistview/speech/tts/tagHelper +++ b/ej2-asp-core-mvc/code-snippet/ai-assistview/speech/tts/tagHelper @@ -24,10 +24,12 @@ var stopStreaming = false; var currentUtterance; + // Initializes the AIAssistView component reference when created function onCreated() { assistObj = ej.base.getComponent(document.getElementById("aiAssistView"), "aiassistview"); } + // Handles toolbar item clicks, such as clearing the conversation on refresh function toolbarItemClicked(args) { if (args.item.iconCss === 'e-icons e-refresh') { assistObj.prompts = []; @@ -35,6 +37,7 @@ } } + // Handles clicks on response toolbar items, such as copying, reading aloud, liking, or disliking the response function onResponseToolbarItemClicked(args) { const responseHtml = assistObj.prompts[args.dataIndex].response; if (responseHtml) { @@ -63,7 +66,7 @@ } } - + // Streams the AI response character by character to create a typing effect async function streamResponse(response) { let lastResponse = ''; const responseUpdateRate = 10; @@ -81,6 +84,7 @@ } } + // Handles prompt requests by sending them to the server API endpoint and streaming the response function onPromptRequest(args) { // Get antiforgery token var tokenElement = document.querySelector('input[name="__RequestVerificationToken"]'); @@ -117,6 +121,7 @@ }); } + // Stops the ongoing streaming response function stopRespondingClick() { stopStreaming = true; }