You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/speech-to-text/methods.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,17 @@ documentation: ug
9
9
10
10
# Methods in Blazor SpeechToText component
11
11
12
+
The Blazor SpeechToText component provides public methods that allow you to programmatically control its listening state.
13
+
12
14
## Start listening
13
15
14
-
You can use the [StartListeningAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_StartListeningAsync) public method to initiate the speech recognition and begins the conversion of the speech to text.
16
+
The [StartListeningAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_StartListeningAsync) public method programmatically initiates speech recognition. When called, the component begins capturing audio and converting it to text.
15
17
16
18
## Stop listening
17
19
18
-
You can use the [StopListeningAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_StopListeningAsync) public method to stop capturing your speech and ends the speech recognition.
20
+
The [StopListeningAsync](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_StopListeningAsync) public method programmatically stops the speech recognition process.
19
21
20
-
Below sample demonstrates the SpeechToText component configured with above methods.
22
+
The following example demonstrates the SpeechToText component configured with above methods.
Copy file name to clipboardExpand all lines: blazor/speech-to-text/security.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,35 +7,35 @@ control: SpeechToText
7
7
documentation: ug
8
8
---
9
9
10
-
# Security concerns in Blazor SpeechToText component
10
+
# Security concerns in Blazor SpeechToText Component
11
11
12
12
## Online dependency
13
13
14
-
The SpeechToText component typically relies on browser-based APIs, which may require an active internet connection. If an internet connection is unavailable, an offline fallback should be considered.
14
+
The Syncfusion Blazor SpeechToText component utilizes browser-based Web Speech APIs, which generally require an active internet connection to process speech data. This dependency introduces important security and privacy considerations that developers must address.
15
15
16
-
## Potential security risks
16
+
## Potential Security Risks
17
17
18
-
Understanding the risks associated with speech recognition.
18
+
When using speech recognition technology, it is essential to be aware of the following potential security risks:
19
19
20
-
### Data transmission to external servers
20
+
### Data Transmission to External Servers
21
21
22
-
The audio data is sent to third-party servers (e.g., Google, Microsoft) for processing. So the sensitive spoken information might be exposed to external entities.
22
+
Since speech-to-text processing is often handled by third-party services (e.g., Google, Microsoft), audio data is transmitted to external servers. This can expose sensitive spoken information to external entities.
23
23
24
-
### Privacy concerns
24
+
### Privacy Concerns
25
25
26
-
Some services may store user voice data for analytics or improving AI models. Users should verify browser and service policies.
26
+
Some speech recognition services may retain voice data for analytics or to improve their models. It is crucial to review the privacy policies of both the browser and the specific speech service being used.
27
27
28
-
### Man-in-the-Middle (MITM) attacks
28
+
### Man-in-the-Middle (MITM) Attacks
29
29
30
-
Without HTTPS, attackers could intercept audio data during transmission.
30
+
If the application is not served over HTTPS, attackers could intercept the audio data stream during transmission in a Man-in-the-Middle (MITM) attack.
31
31
32
-
### Browser and permission exploits
32
+
### Browser and Permission Exploits
33
33
34
-
Malicious websites may misuse permissions to eavesdrop on conversations. Explicit user consent is essential before enabling microphone access.
34
+
A malicious website could misuse microphone permissions to eavesdrop on user conversations. Therefore, obtaining explicit user consent before accessing the microphone is a critical security measure.
35
35
36
-
## Mitigation strategies
36
+
## Mitigation Strategies
37
37
38
-
Ensuring security and privacy when using speech recognition and how to mitigate them.
38
+
To ensure security and privacy when implementing speech recognition, adopt the following mitigation strategies:
Copy file name to clipboardExpand all lines: blazor/speech-to-text/speech-recognition.md
+29-35Lines changed: 29 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,11 @@ documentation: ug
9
9
10
10
# Speech recognition in Blazor SpeechToText component
11
11
12
+
The Syncfusion Blazor SpeechToText component offers a comprehensive set of features for managing the speech recognition process. You can retrieve transcribed text, configure the recognition language, control interim results, monitor the component's state, and handle errors.
13
+
12
14
## Retrieving transcripts
13
15
14
-
You can use the [Transcript](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_Transcript) property to retrieve the transcribed text from the spoken text. This property allows to display the transcribed text once the speech recognition process is started.
16
+
Use the [Transcript](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_Transcript) property to retrieve the transcribed text from spoken input. This property allows to display the transcribed text once the speech recognition process is started.
15
17
16
18
{% tabs %}
17
19
{% highlight razor %}
@@ -42,7 +44,7 @@ You can use the [Transcript](https://help.syncfusion.com/cr/blazor/Syncfusion.Bl
42
44
43
45
## Setting language
44
46
45
-
You can use the [Language](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_Language) property to specify the language for speech recognition. Setting this property ensures that the recognition engine interprets the spoken words correctly based on the specified localesuch as `en-US` for American `English`, `fr-FR` for `French`, and more.
47
+
Specify the recognition language using the [Language](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_Language) property. This ensures the recognition engine correctly interprets speech based on the specified locale. The property accepts standard language codes, such as `en-US` for American English, `fr-FR` for French, or `es-ES` for Spanish.
46
48
47
49
{% tabs %}
48
50
{% highlight razor %}
@@ -73,7 +75,7 @@ You can use the [Language](https://help.syncfusion.com/cr/blazor/Syncfusion.Blaz
73
75
74
76
## Allowing interim results
75
77
76
-
You can use the [AllowInterimResults](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_AllowInterimResults) property to enable or disable interim results. When set to `true`, the recognized speech will be displayed in real time as words are spoken. When set to `false`, only final results will be displayed after recognition is complete. By default, the value is `true`.
78
+
The [AllowInterimResults](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_AllowInterimResults) property controls whether the component displays transcription results as they are being recognized. When `true` (the default), the `Transcript` is updated continuously. When `false`, the `Transcript` is updated only after the speaker pauses and the engine finalizes the result.
77
79
78
80
{% tabs %}
79
81
{% highlight razor %}
@@ -104,19 +106,11 @@ You can use the [AllowInterimResults](https://help.syncfusion.com/cr/blazor/Sync
104
106
105
107
## Managing listening state
106
108
107
-
You can use the [ListeningState](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_ListeningState) property to manage the listening state of the component. The possible values are `Inactive`, `Listening` and `Stopped`. By default, the value is `Inactive`.
108
-
109
-
### Inactive
110
-
111
-
The component is in idle state with no active speech recognition.
112
-
113
-
### Listening
114
-
115
-
It is actively listening which captures and transcribes speech with a stop icon and blinking animation.
116
-
117
-
### Stopped
109
+
Track the component's status using the [ListeningState](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_ListeningState) property, which returns the current state of the speech recognition process. This is useful for providing visual feedback to the user.
118
110
119
-
Denotes the speech recognition has ended, and no further speech is being processed.
111
+
***Inactive**: The component is idle and not performing any recognition. This is the default state.
112
+
***Listening**: The component is actively capturing audio and transcribing speech.
113
+
***Stopped**: The speech recognition process has ended, and the component is no longer capturing audio.
120
114
121
115
Below sample demonstrates the usage of [ListeningState](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_ListeningState) property.
122
116
@@ -251,7 +245,7 @@ Below sample demonstrates the usage of [ListeningState](https://help.syncfusion.
251
245
252
246
## Show or hide tooltip
253
247
254
-
You can use the [ShowTooltip](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_ShowTooltip) propertyto specify the tooltip text to be displayed on hovering the SpeechToText button. By default, the value is `true`.
248
+
Control the visibility of the tooltip on the component's microphone button using the [ShowTooltip](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_ShowTooltip)boolean property. When set to `false`, the default tooltip will not be displayed on hover. The default value is `true`.
255
249
256
250
{% tabs %}
257
251
{% highlight razor %}
@@ -284,7 +278,7 @@ You can use the [ShowTooltip](https://help.syncfusion.com/cr/blazor/Syncfusion.B
284
278
285
279
## Setting disabled
286
280
287
-
You can use the [Disabled](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_Disabled) property to disable the SpeechToText component, preventing user interaction when set to `true`. By default, the value is `false`.
281
+
Disable the SpeechToText component by setting the [Disabled](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_Disabled) property to `true`. This prevents all user interaction with the microphone button. By default, this property is `false`.
288
282
289
283
{% tabs %}
290
284
{% highlight razor %}
@@ -317,31 +311,31 @@ You can use the [Disabled](https://help.syncfusion.com/cr/blazor/Syncfusion.Blaz
317
311
318
312
## Setting html attributes
319
313
320
-
You can use the [HtmlAttributes](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_HtmlAttributes) property to assign custom attributes to the SpeechToText component for the button element.
314
+
The [HtmlAttributes](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Inputs.SfSpeechToText.html#Syncfusion_Blazor_Inputs_SfSpeechToText_HtmlAttributes) property allows you to add custom HTML attributes to the component's root element.
321
315
322
316
## Error handling
323
317
324
-
The SpeechToText component handles various errors that may occur during speech recognition. The following table lists the possible errors and their causes:
318
+
The SpeechToText component provides error events to handle various issues during speech recognition. The following table lists common errors and their causes:
|`no-speech`| The microphone did not detect any speech input.|
329
-
|`aborted`| The speech recognition process was intentionally terminated. |
330
-
|`audio-capture`|The system was unable to detect a microphone device. |
331
-
|`not-allowed`|Access to the microphone was denied by the user or browser settings. |
332
-
|`service-not-allowed`| The current context does not permit the use of the speech recognition service.|
333
-
|`network`| A network issue is preventing the speech recognition service from functioning. |
334
-
|`unsupported-browser`| The browser being used does not support the SpeechRecognition API. |
335
-
|`default`| An unidentified error occurred during the speech recognition process.|
322
+
|`no-speech`| The microphone did not detect any speech. |
323
+
|`aborted`| The recognition process was terminated, either by the user or programmatically.|
324
+
|`audio-capture`|No microphone was found, or there was an issue accessing it.|
325
+
|`not-allowed`|Microphone access was denied by the user or a browser security policy.|
326
+
|`service-not-allowed`| The browser or service denied recognition for security reasons. |
327
+
|`network`| A network connection error prevented communication with the recognition service.|
328
+
|`unsupported-browser`| The browser does not support the Web Speech API.|
329
+
|`default`| An unspecified or unknown error occurred. |
336
330
337
331
## Browser support
338
332
339
-
The SpeechToText component relies on the [Speech Recognition API](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition) for processing the speech input. Ensure that the browser supports this API before implementation.
333
+
The SpeechToText component relies on the browser's implementation of the [Speech Recognition API](https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition). Ensure target browsers support this API.
0 commit comments