Skip to content

Commit 024ef46

Browse files
committed
dictation mode to dpp
1 parent 933c346 commit 024ef46

File tree

6 files changed

+54
-50
lines changed

6 files changed

+54
-50
lines changed

articles/cognitive-services/Speech-Service/display-text-format.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,60 @@ You don't have to speak every punctuation mark out loud. Speech-to-text automati
6060
|how are you|How are you?|
6161
|we can go to the mall park or beach|We can go to the mall, park, or beach.|
6262

63+
## Explicit Punctuation
64+
65+
You can configure speech-to-text to recognize explicit punctuation marks. Then you can speak punctuation aloud in order to make your text more legible. This is especially useful in a situation where you want to use complex punctuation without having to merge it later. Some examples are shown in this table.
66+
67+
|Recognized speech|Display text|
68+
|---|---|
69+
|they entered the room dot dot dot|They entered the room...|
70+
|i heart emoji you period|I <3 you.|
71+
|the options are apple forward slash banana forward slash orange period|The options are apple/banana/orange.|
72+
|are you sure question mark|Are you sure?|
73+
74+
Use the Speech SDK to enable dictation mode when you're using speech-to-text with continuous recognition. This mode will cause the speech configuration instance to interpret word descriptions of sentence structures such as punctuation.
75+
76+
::: zone pivot="programming-language-csharp"
77+
```csharp
78+
speechConfig.EnableDictation();
79+
```
80+
::: zone-end
81+
::: zone pivot="programming-language-cpp"
82+
```cpp
83+
speechConfig->EnableDictation();
84+
```
85+
::: zone-end
86+
::: zone pivot="programming-language-go"
87+
```go
88+
speechConfig.EnableDictation()
89+
```
90+
::: zone-end
91+
::: zone pivot="programming-language-java"
92+
```java
93+
speechConfig.enableDictation();
94+
```
95+
::: zone-end
96+
::: zone pivot="programming-language-javascript"
97+
```javascript
98+
speechConfig.enableDictation();
99+
```
100+
::: zone-end
101+
::: zone pivot="programming-language-objectivec"
102+
```objective-c
103+
[self.speechConfig enableDictation];
104+
```
105+
::: zone-end
106+
::: zone pivot="programming-language-swift"
107+
```swift
108+
self.speechConfig!.enableDictation()
109+
```
110+
::: zone-end
111+
::: zone pivot="programming-language-python"
112+
```python
113+
speech_config.enable_dictation()
114+
```
115+
::: zone-end
116+
63117
## Profanity filter
64118

65119
You can specify whether to mask, remove, or show profanity in the final transcribed text. Masking replaces profane words with asterisk (*) characters so that you can keep the original sentiment of your text while making it more appropriate for certain situations

articles/cognitive-services/Speech-Service/includes/how-to/recognize-speech/cpp.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,6 @@ recognitionEnd.get_future().get();
183183
recognizer->StopContinuousRecognitionAsync().get();
184184
```
185185

186-
## Dictation mode
187-
188-
When you're using continuous recognition, you can enable dictation processing by using the corresponding function. This mode will cause the speech configuration instance to interpret word descriptions of sentence structures such as punctuation. For example, the utterance "Do you live in town question mark" would be interpreted as the text "Do you live in town?".
189-
190-
To enable dictation mode, use the [`EnableDictation`](/cpp/cognitive-services/speech/speechconfig#enabledictation) method on [`SpeechConfig`](/cpp/cognitive-services/speech/speechconfig):
191-
192-
```cpp
193-
config->EnableDictation();
194-
```
195-
196186
## Change the source language
197187

198188
A common task for speech recognition is specifying the input (or source) language. The following example shows how you would change the input language to German. In your code, find your [`SpeechConfig`](/cpp/cognitive-services/speech/speechconfig) instance and add this line directly below it:

articles/cognitive-services/Speech-Service/includes/how-to/recognize-speech/csharp.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -258,16 +258,6 @@ Task.WaitAny(new[] { stopRecognition.Task });
258258
// await recognizer.StopContinuousRecognitionAsync();
259259
```
260260

261-
### Dictation mode
262-
263-
When you're using continuous recognition, you can enable dictation processing by using the corresponding function. This mode will cause the speech configuration instance to interpret word descriptions of sentence structures such as punctuation. For example, the utterance "Do you live in town question mark" would be interpreted as the text "Do you live in town?".
264-
265-
To enable dictation mode, use the [`EnableDictation`](/dotnet/api/microsoft.cognitiveservices.speech.speechconfig.enabledictation) method on [`SpeechConfig`](/dotnet/api/microsoft.cognitiveservices.speech.speechconfig):
266-
267-
```csharp
268-
speechConfig.EnableDictation();
269-
```
270-
271261
## Change the source language
272262

273263
A common task for speech recognition is specifying the input (or source) language. The following example shows how you would change the input language to Italian. In your code, find your [`SpeechConfig`](/dotnet/api/microsoft.cognitiveservices.speech.speechconfig) instance and add this line directly below it:

articles/cognitive-services/Speech-Service/includes/how-to/recognize-speech/java.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,6 @@ stopTranslationWithFileSemaphore.acquire();
201201
recognizer.stopContinuousRecognitionAsync().get();
202202
```
203203

204-
### Dictation mode
205-
206-
When you're using continuous recognition, you can enable dictation processing by using the corresponding function. This mode will cause the speech configuration instance to interpret word descriptions of sentence structures such as punctuation. For example, the utterance "Do you live in town question mark" would be interpreted as the text "Do you live in town?".
207-
208-
To enable dictation mode, use the [`enableDictation`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig.enabledictation) method on [`SpeechConfig`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig):
209-
210-
```java
211-
config.enableDictation();
212-
```
213-
214204
## Change the source language
215205

216206
A common task for speech recognition is specifying the input (or source) language. The following example shows how you would change the input language to French. In your code, find your [`SpeechConfig`](/java/api/com.microsoft.cognitiveservices.speech.speechconfig) instance and add this line directly below it:

articles/cognitive-services/Speech-Service/includes/how-to/recognize-speech/javascript.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,16 +181,6 @@ recognizer.startContinuousRecognitionAsync();
181181
// recognizer.stopContinuousRecognitionAsync();
182182
```
183183

184-
### Dictation mode
185-
186-
When you're using continuous recognition, you can enable dictation processing by using the corresponding function. This mode will cause the speech configuration instance to interpret word descriptions of sentence structures such as punctuation. For example, the utterance "Do you live in town question mark" would be interpreted as the text "Do you live in town?".
187-
188-
To enable dictation mode, use the [`enableDictation`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig#enabledictation--) method on [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig):
189-
190-
```javascript
191-
speechConfig.enableDictation();
192-
```
193-
194184
## Change the source language
195185

196186
A common task for speech recognition is specifying the input (or source) language. The following example shows how you would change the input language to Italian. In your code, find your [`SpeechConfig`](/javascript/api/microsoft-cognitiveservices-speech-sdk/speechconfig) instance and add this line directly below it:

articles/cognitive-services/Speech-Service/includes/how-to/recognize-speech/python.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,16 +148,6 @@ while not done:
148148
time.sleep(.5)
149149
```
150150

151-
### Dictation mode
152-
153-
When you're using continuous recognition, you can enable dictation processing by using the corresponding function. This mode will cause the speech configuration instance to interpret word descriptions of sentence structures such as punctuation. For example, the utterance "Do you live in town question mark" would be interpreted as the text "Do you live in town?".
154-
155-
To enable dictation mode, use the [`enable_dictation()`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig#enable-dictation--) method on [`SpeechConfig`](/python/api/azure-cognitiveservices-speech/azure.cognitiveservices.speech.speechconfig):
156-
157-
```Python
158-
SpeechConfig.enable_dictation()
159-
```
160-
161151
## Change the source language
162152

163153
A common task for speech recognition is specifying the input (or source) language. The following example shows how you would change the input language to German. In your code, find your `SpeechConfig` instance and add this line directly below it:

0 commit comments

Comments
 (0)