Skip to content

Commit 46426cd

Browse files
committed
Clean up SDK private endpoint guide to be more concise
1 parent 8d2303f commit 46426cd

File tree

1 file changed

+11
-48
lines changed

1 file changed

+11
-48
lines changed

articles/ai-services/speech-service/speech-services-private-link.md

Lines changed: 11 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -242,55 +242,18 @@ Private-endpoint-enabled endpoints communicate with Speech service via a special
242242

243243
A "standard" endpoint URL looks like: <p/>`{region}.{speech service offering}.speech.microsoft.com/{URL path}`
244244

245-
A private endpoint URL looks like: <p/>`{your custom name}.cognitiveservices.azure.com/{speech service offering}/{URL path}`
245+
A private endpoint URL looks like: <p/>`{your custom name}.cognitiveservices.azure.com/{URL path}`
246246

247-
The Speech SDK automatically will configure the `/{URL path}` depending on the service used. Therefor only the `/{baseURL}` must be configured as described.
248-
249-
**Example 1.** An application is communicating by using the following URL (speech recognition using the base model for US English in West Europe):
250-
251-
```
252-
wss://westeurope.stt.speech.microsoft.com
253-
```
254-
255-
To use it in the private-endpoint-enabled scenario when the custom domain name of the Speech resource is `my-private-link-speech.cognitiveservices.azure.com`, you must modify the URL like this:
256-
257-
```
258-
wss://my-private-link-speech.cognitiveservices.azure.com
259-
```
260-
261-
**Example 2.** An application uses the following URL to synthesize speech in West Europe:
262-
```
263-
wss://westeurope.tts.speech.microsoft.com
264-
```
265-
266-
The following equivalent URL uses a private endpoint, where the custom domain name of the Speech resource is `my-private-link-speech.cognitiveservices.azure.com`:
267-
268-
```
269-
wss://my-private-link-speech.cognitiveservices.azure.com
270-
```
247+
The Speech SDK automatically will configure the `/{URL path}` depending on the service used.
248+
Therefor only the `/{baseURL}` must be configured as described.
271249

272250
#### Modifying applications
273251

274252
Follow these steps to modify your code:
275253

276-
1. Determine the application endpoint URL:
277-
278-
- [Turn on logging for your application](how-to-use-logging.md) and run it to log activity.
279-
- In the log file, search for `SPEECH-ConnectionUrl`. In matching lines, the `value` parameter contains the full URL that your application used to reach the Speech service.
280-
281-
Example:
254+
1. Determine the application endpoint URL from the 'Keys and Endpoints' menu of your resource on Azure Portal. In this example it would be `my-private-link-speech.cognitiveservices.azure.com`.
282255

283-
```
284-
(114917): 41ms SPX_DBG_TRACE_VERBOSE: property_bag_impl.cpp:138 ISpxPropertyBagImpl::LogPropertyAndValue: this=0x0000028FE4809D78; name='SPEECH-ConnectionUrl'; value='wss://westeurope.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?traffictype=spx&language=en-US'
285-
```
286-
287-
So the URL that the application used in this example is:
288-
289-
```
290-
wss://westeurope.stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=en-US
291-
```
292-
293-
2. Create a `SpeechConfig` instance by using a full endpoint URL:
256+
2. Create a `SpeechConfig` instance by using a endpoint URL:
294257

295258
1. Modify the endpoint that you determined, as described in the earlier [Construct endpoint URL](#construct-endpoint-url) section.
296259

@@ -302,7 +265,7 @@ Follow these steps to modify your code:
302265

303266
To make it work, modify how you instantiate the `SpeechConfig` class and use "from endpoint"/"with endpoint" initialization. Suppose we have the following two variables defined:
304267
- `speechKey` contains the key of the private-endpoint-enabled Speech resource.
305-
- `endPoint` contains the full *modified* endpoint URL (using the type required by the corresponding programming language). In our example, this variable should contain:
268+
- `endPoint` contains the *modified* endpoint URL (using the type required by the corresponding programming language). In our example, this variable should contain:
306269
```
307270
wss://my-private-link-speech.cognitiveservices.azure.com
308271
```
@@ -331,6 +294,11 @@ Follow these steps to modify your code:
331294

332295
After this modification, your application should work with the private-endpoint-enabled Speech resources. We're working on more seamless support of private endpoint scenarios.
333296

297+
### Speech resource with a custom domain name and without private endpoints: Usage with the Speech SDK
298+
299+
Using the Speech SDK with custom-domain-enabled Speech resources *without* private endpoints is equivalent to the configuration described *with* private endpoints in this document.
300+
301+
334302
[!INCLUDE [](includes/speech-studio-vnet.md)]
335303

336304

@@ -379,11 +347,6 @@ In this case, usage of the Speech to text REST API for short audio and usage of
379347
>
380348
> Using an authorization token and passing it to the special endpoint via the `Authorization` header will work *only* if you've turned on the **All networks** access option in the **Networking** section of your Speech resource. In other cases you will get either `Forbidden` or `BadRequest` error when trying to obtain an authorization token.
381349

382-
### Speech resource with a custom domain name and without private endpoints: Usage with the Speech SDK
383-
384-
Using the Speech SDK with custom-domain-enabled Speech resources *without* private endpoints is equivalent to the configuration described *with* private endpoints in this document.
385-
386-
387350
[!INCLUDE [](includes/speech-vnet-service-enpoints-private-endpoints-simultaneously.md)]
388351

389352
## Pricing

0 commit comments

Comments
 (0)