Skip to content

Commit fb3288a

Browse files
committed
Adding extra languages to explain how to use Sovereign Cloud endpoints.
1st try.
1 parent 551256c commit fb3288a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,30 @@ Replace `<REGION_IDENTIFIER>` with the identifier matching the region of your su
6666
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).
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::FromEndpoint(endPoint, subscriptionKey);
77+
```
78+
# [Java](#tab/java)
79+
```java
80+
SpeechConfig config = SpeechConfig.fromEndpoint(endPoint, subscriptionKey);
81+
```
82+
# [Python](#tab/python)
83+
```python
84+
import azure.cognitiveservices.speech as speechsdk
85+
speech_config = speechsdk.SpeechConfig(endpoint=endPoint, subscription=subscriptionKey)
86+
```
87+
# [Objective-C](#tab/objective-c)
88+
```objectivec
89+
SPXSpeechConfiguration *speechConfig = [[SPXSpeechConfiguration alloc] initWithEndpoint:endPoint 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

0 commit comments

Comments
 (0)