Skip to content

Commit 9e5219a

Browse files
authored
Merge pull request #79523 from IEvangelist/33246-invalid-csharp-example-bug
Addresses MicrosoftDocs/azure-docs#33246
2 parents b1e1d35 + 5dddfbc commit 9e5219a

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

articles/cognitive-services/Speech-Service/speech-container-howto.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,13 @@ The following table describes the minimum and recommended CPU cores and memory t
6666

6767
* Each core must be at least 2.6 gigahertz (GHz) or faster.
6868

69-
7069
Core and memory correspond to the `--cpus` and `--memory` settings, which are used as part of the `docker run` command.
7170

7271
**Note**; The minimum and recommended are based off of Docker limits, *not* the host machine resources. For example, speech-to-text containers memory map portions of a large language model, and it is _recommended_ that the entire file fits in memory, which is an additional 4-6 GB. Also, the first run of either container may take longer, since models are being paged into memory.
7372

7473
## Get the container image with `docker pull`
7574

76-
Container images for Speech are available.
75+
Container images for Speech are available.
7776

7877
| Container | Repository |
7978
|-----------|------------|
@@ -84,7 +83,7 @@ Container images for Speech are available.
8483

8584
### Language locale is in container tag
8685

87-
The `latest` tag pulls the `en-us` locale and `jessarus` voice.
86+
The `latest` tag pulls the `en-us` locale and `jessarus` voice.
8887

8988
#### Speech to text locales
9089

@@ -114,7 +113,6 @@ The following table lists the supported locales for **speech-to-text** in the 1.
114113
|Portuguese|`pt-br`|
115114
|Spanish|`es-es`<br>`es-mx`|
116115

117-
118116
#### Text to speech locales
119117

120118
All tags, except for `latest` are in the following format, where the `<culture>` indicates the locale and the `<voice>` indicates the voice of the container:
@@ -166,8 +164,8 @@ docker pull containerpreview.azurecr.io/microsoft/cognitive-services-text-to-spe
166164

167165
Once the container is on the [host computer](#the-host-computer), use the following process to work with the container.
168166

169-
1. [Run the container](#run-the-container-with-docker-run), with the required but not used billing settings. More [examples](speech-container-configuration.md#example-docker-run-commands) of the `docker run` command are available.
170-
1. [Query the container's prediction endpoint](#query-the-containers-prediction-endpoint).
167+
1. [Run the container](#run-the-container-with-docker-run), with the required but not used billing settings. More [examples](speech-container-configuration.md#example-docker-run-commands) of the `docker run` command are available.
168+
1. [Query the container's prediction endpoint](#query-the-containers-prediction-endpoint).
171169

172170
## Run the container with `docker run`
173171

@@ -189,7 +187,7 @@ docker run --rm -it -p 5000:5000 --memory 2g --cpus 1 \
189187
containerpreview.azurecr.io/microsoft/cognitive-services-text-to-speech \
190188
Eula=accept \
191189
Billing={BILLING_ENDPOINT_URI} \
192-
ApiKey={BILLING_KEY}
190+
ApiKey={BILLING_KEY}
193191
```
194192

195193
### Speech-to-text
@@ -199,15 +197,15 @@ docker run --rm -it -p 5000:5000 --memory 2g --cpus 2 \
199197
containerpreview.azurecr.io/microsoft/cognitive-services-speech-to-text \
200198
Eula=accept \
201199
Billing={BILLING_ENDPOINT_URI} \
202-
ApiKey={BILLING_KEY}
200+
ApiKey={BILLING_KEY}
203201
```
204202

205203
This command:
206204

207205
* Runs a Speech container from the container image
208206
* Allocates 2 CPU cores and 2 gigabytes (GB) of memory
209207
* Exposes TCP port 5000 and allocates a pseudo-TTY for the container
210-
* Automatically removes the container after it exits. The container image is still available on the host computer.
208+
* Automatically removes the container after it exits. The container image is still available on the host computer.
211209

212210
> [!IMPORTANT]
213211
> The `Eula`, `Billing`, and `ApiKey` options must be specified to run the container; otherwise, the container won't start. For more information, see [Billing](#billing).
@@ -236,7 +234,9 @@ var config = SpeechConfig.FromSubscription("YourSubscriptionKey", "YourServiceRe
236234
to this call using the container endpoint:
237235

238236
```C#
239-
var config = SpeechConfig.FromEndpoint("ws://localhost:5000/speech/recognition/dictation/cognitiveservices/v1", "YourSubscriptionKey");
237+
var config = SpeechConfig.FromEndpoint(
238+
new Uri("ws://localhost:5000/speech/recognition/dictation/cognitiveservices/v1"),
239+
"YourSubscriptionKey");
240240
```
241241

242242
#### For Python
@@ -257,21 +257,19 @@ speech_config = speechsdk.SpeechConfig(subscription=speech_key, endpoint="ws://l
257257

258258
The container provides REST endpoint APIs which can be found [here](https://docs.microsoft.com/azure/cognitive-services/speech-service/rest-text-to-speech) and samples can be found [here](https://azure.microsoft.com/resources/samples/cognitive-speech-tts/).
259259

260-
261260
[!INCLUDE [Validate container is running - Container's API documentation](../../../includes/cognitive-services-containers-api-documentation.md)]
262261

263-
264262
## Stop the container
265263

266264
[!INCLUDE [How to stop the container](../../../includes/cognitive-services-containers-stop.md)]
267265

268266
## Troubleshooting
269267

270-
When you run the container, the container uses **stdout** and **stderr** to output information that is helpful to troubleshoot issues that happen while starting or running the container.
268+
When you run the container, the container uses **stdout** and **stderr** to output information that is helpful to troubleshoot issues that happen while starting or running the container.
271269

272270
## Billing
273271

274-
The Speech containers send billing information to Azure, using a _Speech_ resource on your Azure account.
272+
The Speech containers send billing information to Azure, using a _Speech_ resource on your Azure account.
275273

276274
[!INCLUDE [Container's Billing Settings](../../../includes/cognitive-services-containers-how-to-billing-info.md)]
277275

0 commit comments

Comments
 (0)