Skip to content

Commit 08fd83d

Browse files
Merge pull request #6694 from syncfusion-content/983717-UG-docs-STT-2
983717: Enhanced the blazor documentation for Speech-to-text
2 parents ef890cc + 7756941 commit 08fd83d

File tree

3 files changed

+72
-66
lines changed

3 files changed

+72
-66
lines changed

blazor/speech-to-text/getting-started-wasm.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ documentation: ug
99

1010
<!-- markdownlint-disable MD040 -->
1111

12-
# Getting Started with Blazor SpeechToText in Blazor WASM App
12+
# Getting Started with Blazor SpeechToText in a Blazor WASM App
1313

14-
This section briefly explains about how to include [Blazor SpeechToText](https://www.syncfusion.com/blazor-components) component in your Blazor WASM App using Visual Studio and Visual Studio Code.
14+
This section explains how to add the [Blazor SpeechToText](https://www.syncfusion.com/blazor-components) component to a Blazor WebAssembly application using either Visual Studio or Visual Studio Code.
1515

1616
{% tabcontents %}
1717

@@ -23,11 +23,13 @@ This section briefly explains about how to include [Blazor SpeechToText](https:/
2323

2424
## Create a new Blazor App in Visual Studio
2525

26-
You can create a **Blazor WebAssembly App** using Visual Studio via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-7.0) or the [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
26+
Create a **Blazor WebAssembly App** in Visual Studio by using either the standard [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-7.0) or the [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-integration/template-studio).
2727

2828
## Install Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Inputs NuGet in the App
2929

30-
To add **Blazor SpeechToText** in the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search and install [Syncfusion.Blazor.Inputs](https://www.nuget.org/packages). Alternatively, you can utilize the following package manager command to achieve the same.
30+
To add the **Blazor SpeechToText** component to the app, open the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*), search for and install [Syncfusion.Blazor.Inputs](https://www.nuget.org/packages). Alternatively, use the following package manager command to install it.
31+
32+
To add **Blazor SpeechToText** to the application, open the NuGet Package Manager in Visual Studio (Tools → NuGet Package Manager → Manage NuGet Packages for Solution), search for and install [Syncfusion.Blazor.Inputs](https://www.nuget.org/packages). Alternatively, the package can be installed using the following Package Manager Console command.
3133

3234
{% tabs %}
3335
{% highlight C# tabtitle="Package Manager" %}
@@ -49,9 +51,9 @@ N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are availa
4951

5052
## Create a new Blazor App in Visual Studio Code
5153

52-
You can create a **Blazor WebAssembly App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-7.0&pivots=vsc) or the [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
54+
Create a **Blazor WebAssembly App** using Visual Studio Code via [Microsoft Templates](https://learn.microsoft.com/en-us/aspnet/core/blazor/tooling?view=aspnetcore-7.0&pivots=vsc) or the [Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Extension](https://blazor.syncfusion.com/documentation/visual-studio-code-integration/create-project).
5355

54-
Alternatively, you can create a WebAssembly application using the following command in the terminal(<kbd>Ctrl</kbd>+<kbd>`</kbd>).
56+
Alternatively, the application can be created by executing the following command in the terminal(<kbd>Ctrl</kbd>+<kbd>)`.
5557

5658
{% tabs %}
5759

@@ -89,7 +91,7 @@ N> Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components are availa
8991

9092
## Register Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service
9193

92-
Open **~/_Imports.razor** file and import the Syncfusion.Blazor namespace.
94+
Open the **~/_Imports.razor** file and add the `Syncfusion.Blazor` namespace.
9395

9496
{% tabs %}
9597
{% highlight razor tabtitle="~/_Imports.razor" %}
@@ -100,7 +102,7 @@ Open **~/_Imports.razor** file and import the Syncfusion.Blazor namespace.
100102
{% endhighlight %}
101103
{% endtabs %}
102104

103-
Now, register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service in the **~/Program.cs** file of your Blazor WebAssembly App.
105+
Next, register the Syncfusion Blazor Service in the **~/Program.cs** file. This enables the use of Syncfusion components in the application.
104106

105107
{% tabs %}
106108
{% highlight C# tabtitle="Blazor WebAssembly App" hl_lines="3 11" %}
@@ -122,23 +124,25 @@ await builder.Build().RunAsync();
122124
{% endhighlight %}
123125
{% endtabs %}
124126

125-
## Add script resources
127+
## Script and Style reference
126128

127-
The script can be accessed from NuGet through [Static Web Assets](https://blazor.syncfusion.com/documentation/appearance/themes#static-web-assets). Reference the script in the `<head>` of the main page as follows:
129+
- Ensure that CSS stylesheets are referenced inside the tag.
130+
- Ensure that JavaScript files or script references are placed end of the tag.
131+
- If any markdown content or code snippet violates this structure, update it accordingly.
128132

129-
* For Blazor WebAssembly app, include it in the **~/index.html** file.
133+
* For a Blazor WebAssembly app, modify the **~/wwwroot/index.html** file.
130134

131135
```html
132136
<head>
133137
....
134138
<script src="_content/Syncfusion.Blazor.Core/scripts/syncfusion-blazor.min.js" type="text/javascript"></script>
135139
</head>
136140
```
137-
N> Check out the [Adding Script Reference](https://blazor.syncfusion.com/documentation/common/adding-script-references) topic to learn different approaches for adding script references in your Blazor application.
141+
N> To learn about other ways to add script references, see the [Adding Script Reference](https://blazor.syncfusion.com/documentation/common/adding-script-references) topic.
138142

139-
## Adding Blazor SpeechToText component
143+
## Add Blazor SpeechToText component
140144

141-
Add the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor SpeechToText component in the **~/Pages/Index.razor** file.
145+
Add the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor SpeechToText component to the **~/Pages/Index.razor** file.
142146

143147
{% tabs %}
144148
{% highlight razor %}
@@ -167,15 +171,15 @@ Add the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor SpeechToText com
167171
{% endhighlight %}
168172
{% endtabs %}
169173

170-
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. This will render the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor SpeechToText component in your default web browser.
174+
* Press <kbd>Ctrl</kbd>+<kbd>F5</kbd> (Windows) or <kbd>⌘</kbd>+<kbd>F5</kbd> (macOS) to launch the application. The Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor SpeechToText component will be rendered in your default web browser.
171175

172176
![Blazor SpeechToText Component](images/getting-started.png)
173177

174-
> The [SpeechToText](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html) component requires an internet connection and using a browser that supports [SpeechRecognition](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition) from the Web Speech API.
178+
> The [SpeechToText](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html) component requires an internet connection and a browser that supports the [SpeechRecognition](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition) Web Speech API.
175179
176-
## Adding button content
180+
## Add button content
177181

178-
You can use the [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SpeechToTextButtonSettings.html#Syncfusion_Blazor_Inputs_SpeechToTextButtonSettings_Text) property to display the start listening text and [StopStateText](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SpeechToTextButtonSettings.html#Syncfusion_Blazor_Inputs_SpeechToTextButtonSettings_StopStateText) property to display the stop listening text by using the [ButtonSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_ButtonSettings) property.
182+
Use the [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SpeechToTextButtonSettings.html#Syncfusion_Blazor_Inputs_SpeechToTextButtonSettings_Text) property to display the start listening text and [StopStateText](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SpeechToTextButtonSettings.html#Syncfusion_Blazor_Inputs_SpeechToTextButtonSettings_StopStateText) property to display the stop listening text by using the [ButtonSettings](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_ButtonSettings) property.
179183

180184
{% tabs %}
181185
{% highlight razor %}
@@ -212,7 +216,7 @@ You can use the [Text](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.I
212216
![Blazor SpeechToText with Button Content Start text](images/btn-content-start.png)
213217
![Blazor SpeechToText with Button Content Stop text](images/btn-content-stop.png)
214218

215-
## See also
219+
## See Also
216220

217221
* [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor for Client-Side in .NET Core CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-webassembly-dotnet-cli)
218222
* [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor for Server-Side in Visual Studio](https://blazor.syncfusion.com/documentation/getting-started/blazor-server-side-visual-studio)

0 commit comments

Comments
 (0)