Skip to content

Commit 8ad3dc9

Browse files
authored
Merge pull request #179138 from alexeyo26/alexeyo/sovereign-endpoint-update
[CogSvc] Speech. Update on SDK usage for Sovereign Clouds.
2 parents c02ac7b + c4a9a3e commit 8ad3dc9

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
@@ -63,12 +63,33 @@ Replace `<REGION_IDENTIFIER>` with the identifier matching the region of your su
6363

6464
#### Speech SDK
6565

66-
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).
66+
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).
6767

6868
`SpeechConfig` class should be instantiated like this:
69+
70+
# [C#](#tab/c-sharp)
6971
```csharp
7072
var config = SpeechConfig.FromHost(usGovHost, subscriptionKey);
7173
```
74+
# [C++](#tab/cpp)
75+
```cpp
76+
auto config = SpeechConfig::FromHost(usGovHost, subscriptionKey);
77+
```
78+
# [Java](#tab/java)
79+
```java
80+
SpeechConfig config = SpeechConfig.fromHost(usGovHost, subscriptionKey);
81+
```
82+
# [Python](#tab/python)
83+
```python
84+
import azure.cognitiveservices.speech as speechsdk
85+
speech_config = speechsdk.SpeechConfig(host=usGovHost, subscription=subscriptionKey)
86+
```
87+
# [Objective-C](#tab/objective-c)
88+
```objectivec
89+
SPXSpeechConfiguration *speechConfig = [[SPXSpeechConfiguration alloc] initWithHost:usGovHost subscription:subscriptionKey];
90+
```
91+
***
92+
7293
Speech CLI should be used like this (note the `--host` option):
7394
```dos
7495
spx recognize --host "usGovHost" --file myaudio.wav
@@ -153,4 +174,4 @@ Replace `subscriptionKey` with your Speech resource key. Replace `azCnHost` with
153174
| Text-to-Speech | `https://chinaeast2.tts.speech.azure.cn` |
154175
| **China North 2** | |
155176
| Speech-to-text | `wss://chinanorth2.stt.speech.azure.cn` |
156-
| Text-to-Speech | `https://chinanorth2.tts.speech.azure.cn` |
177+
| Text-to-Speech | `https://chinanorth2.tts.speech.azure.cn` |

0 commit comments

Comments
 (0)