Skip to content

Commit d7d03e3

Browse files
authored
Merge pull request #179152 from alexeyo26/alexeyo/sovereign-endpoint-update-mc
[CogSvc] Speech. Update on SDK and sovereign clouds. Mooncake
2 parents aaccb63 + d88d11e commit d7d03e3

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

articles/cognitive-services/Speech-Service/sovereign-clouds.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.service: cognitive-services
99
ms.subservice: speech-service
1010
ms.topic: conceptual
1111
ms.custom: references_regions
12-
ms.date: 08/24/2021
12+
ms.date: 11/09/2021
1313
ms.author: alexeyo
1414
---
1515

@@ -155,12 +155,33 @@ Replace `<REGION_IDENTIFIER>` with the identifier matching the region of your su
155155

156156
#### Speech SDK
157157

158-
For Speech SDK in sovereign clouds you need to use "from host" instantiation of `SpeechConfig` class or `--host` option of [Speech CLI](spx-overview.md). (You may also use "from endpoint" instantiation and `--endpoint` Speech CLI option).
158+
For [Speech SDK](speech-sdk.md) in sovereign clouds you need to use "from host / with host" instantiation of `SpeechConfig` class or `--host` option of [Speech CLI](spx-overview.md). (You may also use "from endpoint / with endpoint" instantiation and `--endpoint` Speech CLI option).
159159

160160
`SpeechConfig` class should be instantiated like this:
161+
162+
# [C#](#tab/c-sharp)
161163
```csharp
162164
var config = SpeechConfig.FromHost(azCnHost, subscriptionKey);
163165
```
166+
# [C++](#tab/cpp)
167+
```cpp
168+
auto config = SpeechConfig::FromHost(azCnHost, subscriptionKey);
169+
```
170+
# [Java](#tab/java)
171+
```java
172+
SpeechConfig config = SpeechConfig.fromHost(azCnHost, subscriptionKey);
173+
```
174+
# [Python](#tab/python)
175+
```python
176+
import azure.cognitiveservices.speech as speechsdk
177+
speech_config = speechsdk.SpeechConfig(host=azCnHost, subscription=subscriptionKey)
178+
```
179+
# [Objective-C](#tab/objective-c)
180+
```objectivec
181+
SPXSpeechConfiguration *speechConfig = [[SPXSpeechConfiguration alloc] initWithHost:azCnHost subscription:subscriptionKey];
182+
```
183+
***
184+
164185
Speech CLI should be used like this (note the `--host` option):
165186
```dos
166187
spx recognize --host "azCnHost" --file myaudio.wav

0 commit comments

Comments
 (0)