You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/Speech-Service/speech-container-cstt.md
+74Lines changed: 74 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,8 @@ Obtain the **Model ID** to use as the argument to the `ModelId` parameter of the
91
91
92
92
Use the [docker run](https://docs.docker.com/engine/reference/commandline/run/) command to run the container.
93
93
94
+
# [Container run](#tab/container)
95
+
94
96
The following table represents the various `docker run` parameters and their corresponding descriptions:
95
97
96
98
| Parameter | Description |
@@ -209,6 +211,78 @@ ApiKey={API_KEY}
209
211
> [!NOTE]
210
212
> If you set more than one query or download parameter, the command will prioritize in this order: `BaseModelLocale`, model ID, and then `DisplayLocale` (only applicable for display models).
211
213
214
+
# [Disconnected container run](#tab/disconnected)
215
+
216
+
To run disconnected containers (not connected to the internet), you must submit [this request form](https://aka.ms/csdisconnectedcontainers) and wait for approval. For more information about applying and purchasing a commitment plan to use containers in disconnected environments, see [Use containers in disconnected environments](../containers/disconnected-containers.md#request-access-to-use-containers-in-disconnected-environments).
217
+
218
+
If you have been approved to run the container disconnected from the internet, the following example shows the formatting of the `docker run` command to use, with placeholder values. Replace these placeholder values with your own values.
219
+
220
+
In order to prepare and configure the Custom Speech-to-Text container you will need two separate speech resources:
221
+
222
+
1. A regular Azure Speech Service resource which is either configured to use a "**S0 - Standard**" pricing tier or a "**Speech to Text (Custom)**" commitment tier pricing plan. This will be used to train, download, and configure your custom speech models for use in your container.
223
+
1. An Azure Speech Service resource which is configured to use the "**DC0 Commitment (Disconnected)**" pricing plan. This is used to download your disconnected container license file required to run the container in disconnected mode.
224
+
225
+
Download the docker container and run it to get the required speech model as [described above](#get-the-container-image-with-docker-pull) using the regular Azure Speech resource. Next, you will need to download your disconnected license file.
226
+
227
+
The `DownloadLicense=True` parameter in your `docker run` command will download a license file that will enable your Docker container to run when it isn't connected to the internet. It also contains an expiration date, after which the license file will be invalid to run the container. You can only use a license file with the appropriate container that you've been approved for. For example, you can't use a license file for a speech-to-text container with a form recognizer container.
228
+
229
+
| Placeholder | Description |
230
+
|-------------|-------|
231
+
|`{IMAGE}`| The container image you want to use.<br/><br/>For example: `mcr.microsoft.com/azure-cognitive-services/speech-to-text`|
232
+
|`{LICENSE_MOUNT}`| The path where the license will be downloaded, and mounted.<br/><br/>For example: `/host/license:/path/to/license/directory`|
233
+
|`{ENDPOINT_URI}`| The endpoint for authenticating your service request. You can find it on your resource's **Key and endpoint** page, on the Azure portal.<br/><br/>For example: `https://<your-resource-name>.cognitiveservices.azure.com`|
234
+
|`{API_KEY}`| The key for your Speech resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. |
235
+
|`{CONTAINER_LICENSE_DIRECTORY}`| Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory`|
236
+
237
+
```bash
238
+
docker run --rm -it -p 5000:5000 \
239
+
-v {LICENSE_MOUNT} \
240
+
{IMAGE} \
241
+
eula=accept \
242
+
billing={ENDPOINT_URI} \
243
+
apikey={API_KEY} \
244
+
DownloadLicense=True \
245
+
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
246
+
```
247
+
248
+
Once the license file has been downloaded, you can run the container in a disconnected environment. The following example shows the formatting of the `docker run` command you'll use, with placeholder values. Replace these placeholder values with your own values.
249
+
250
+
Wherever the container is run, the license file must be mounted to the container and the location of the license folder on the container's local filesystem must be specified with `Mounts:License=`. An output mount must also be specified so that billing usage records can be written.
251
+
252
+
Placeholder | Value | Format or example |
253
+
|-------------|-------|---|
254
+
|`{IMAGE}`| The container image you want to use. |`mcr.microsoft.com/azure-cognitive-services/form-recognizer/invoice`|
255
+
`{MEMORY_SIZE}` | The appropriate size of memory to allocate for your container. | `4g` |
256
+
|`{NUMBER_CPUS}`| The appropriate number of CPUs to allocate for your container. |`4`|
257
+
|`{LICENSE_MOUNT}`| The path where the license will be located and mounted. |`/host/license:/path/to/license/directory`|
258
+
|`{OUTPUT_PATH}`| The output path for logging [usage records](../containers/disconnected-containers.md#usage-records). |`/host/output:/path/to/output/directory`|
259
+
|`{MODEL_PATH}`| The path where the model is located. |`/path/to/model/`|
260
+
|`{CONTAINER_LICENSE_DIRECTORY}`| Location of the license folder on the container's local filesystem. |`/path/to/license/directory`|
261
+
|`{CONTAINER_OUTPUT_DIRECTORY}`| Location of the output folder on the container's local filesystem. |`/path/to/output/directory`|
The [Custom Speech-to-Text](../speech-service/speech-container-howto.md?tabs=cstt) container provides a default directory for writing the license file and billing log at runtime. The default directories are /license and /output respectively.
275
+
276
+
When you're mounting these directories to the container with the `docker run -v` command, make sure the local machine directory is set ownership to `user:group nonroot:nonroot` before running the container.
277
+
278
+
Below is a sample command to set file/directory ownership.
#### Custom pronunciation on the custom speech-to-text container
213
287
214
288
You can get custom pronunciation results in the output. All you need to do is have your own custom pronunciation rules set up in your custom model and mount the model to a custom-speech-to-text container.
Copy file name to clipboardExpand all lines: articles/cognitive-services/Speech-Service/speech-container-howto.md
-56Lines changed: 0 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,62 +201,6 @@ The container will test for network connectivity to the billing endpoint.
201
201
202
202
Tu run disconnected containers (not connected to the internet), you must submit [this request form](https://aka.ms/csdisconnectedcontainers) and wait for approval. For more information about applying and purchasing a commitment plan to use containers in disconnected environments, see [Use containers in disconnected environments](../containers/disconnected-containers.md#request-access-to-use-containers-in-disconnected-environments).
203
203
204
-
If you have been approved to run the container disconnected from the internet, the following example shows the formatting of the `docker run` command to use, with placeholder values. Replace these placeholder values with your own values.
205
-
206
-
The `DownloadLicense=True` parameter in your `docker run` command will download a license file that will enable your Docker container to run when it isn't connected to the internet. It also contains an expiration date, after which the license file will be invalid to run the container. You can only use a license file with the appropriate container that you've been approved for. For example, you can't use a license file for a `speech-to-text` container with a `neural-text-to-speech` container.
207
-
208
-
| Placeholder | Description |
209
-
|-------------|-------|
210
-
|`{IMAGE}`| The container image you want to use.<br/><br/>For example: `mcr.microsoft.com/azure-cognitive-services/speech-to-text`|
211
-
|`{LICENSE_MOUNT}`| The path where the license will be downloaded, and mounted.<br/><br/>For example: `/host/license:/path/to/license/directory`|
212
-
|`{ENDPOINT_URI}`| The endpoint for authenticating your service request. You can find it on your resource's **Key and endpoint** page, on the Azure portal.<br/><br/>For example: `https://<your-resource-name>.cognitiveservices.azure.com`|
213
-
|`{API_KEY}`| The key for your Speech resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. |
214
-
|`{CONTAINER_LICENSE_DIRECTORY}`| Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory`|
215
-
216
-
```bash
217
-
docker run --rm -it -p 5000:5000 \
218
-
-v {LICENSE_MOUNT} \
219
-
{IMAGE} \
220
-
eula=accept \
221
-
billing={ENDPOINT_URI} \
222
-
apikey={API_KEY} \
223
-
DownloadLicense=True \
224
-
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
225
-
```
226
-
227
-
Once the license file has been downloaded, you can run the container in a disconnected environment. The following example shows the formatting of the `docker run` command you'll use, with placeholder values. Replace these placeholder values with your own values.
228
-
229
-
Wherever the container is run, the license file must be mounted to the container and the location of the license folder on the container's local filesystem must be specified with `Mounts:License=`. An output mount must also be specified so that billing usage records can be written.
230
-
231
-
Placeholder | Value | Format or example |
232
-
|-------------|-------|---|
233
-
|`{IMAGE}`| The container image you want to use.<br/><br/>For example: `mcr.microsoft.com/azure-cognitive-services/speech-to-text`|
234
-
`{MEMORY_SIZE}` | The appropriate size of memory to allocate for your container.<br/><br/>For example: `4g` |
235
-
|`{NUMBER_CPUS}`| The appropriate number of CPUs to allocate for your container.<br/><br/>For example: `4`|
236
-
|`{LICENSE_MOUNT}`| The path where the license will be located and mounted.<br/><br/>For example: `/host/license:/path/to/license/directory`|
237
-
|`{OUTPUT_PATH}`| The output path for logging [usage records](../containers/disconnected-containers.md#usage-records).<br/><br/>For example: `/host/output:/path/to/output/directory`|
238
-
|`{CONTAINER_LICENSE_DIRECTORY}`| Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory`|
239
-
|`{CONTAINER_OUTPUT_DIRECTORY}`| Location of the output folder on the container's local filesystem.<br/><br/>For example: `/path/to/output/directory`|
Speech containers provide a default directory for writing the license file and billing log at runtime. The default directories are /license and /output respectively.
252
-
253
-
When you're mounting these directories to the container with the `docker run -v` command, make sure the local machine directory is set ownership to `user:group nonroot:nonroot` before running the container.
254
-
255
-
Below is a sample command to set file/directory ownership.
Use the [docker run](https://docs.docker.com/engine/reference/commandline/run/) command to run the container.
82
82
83
+
# [Container run](#tab/container)
84
+
83
85
The following table represents the various `docker run` parameters and their corresponding descriptions:
84
86
85
87
| Parameter | Description |
@@ -106,6 +108,70 @@ This command:
106
108
* Exposes TCP port 5003 and allocates a pseudo-TTY for the container.
107
109
* Automatically removes the container after it exits. The container image is still available on the host computer.
108
110
111
+
112
+
# [Disconnected container run](#tab/disconnected)
113
+
114
+
To run disconnected containers (not connected to the internet), you must submit [this request form](https://aka.ms/csdisconnectedcontainers) and wait for approval. For more information about applying and purchasing a commitment plan to use containers in disconnected environments, see [Use containers in disconnected environments](../containers/disconnected-containers.md#request-access-to-use-containers-in-disconnected-environments).
115
+
116
+
If you have been approved to run the container disconnected from the internet, the following example shows the formatting of the `docker run` command to use, with placeholder values. Replace these placeholder values with your own values.
117
+
118
+
The `DownloadLicense=True` parameter in your `docker run` command will download a license file that will enable your Docker container to run when it isn't connected to the internet. It also contains an expiration date, after which the license file will be invalid to run the container. You can only use a license file with the appropriate container that you've been approved for. For example, you can't use a license file for a `speech-to-text` container with a `neural-text-to-speech` container.
119
+
120
+
| Placeholder | Description |
121
+
|-------------|-------|
122
+
|`{IMAGE}`| The container image you want to use.<br/><br/>For example: `mcr.microsoft.com/azure-cognitive-services/speech-to-text`|
123
+
|`{LICENSE_MOUNT}`| The path where the license will be downloaded, and mounted.<br/><br/>For example: `/host/license:/path/to/license/directory`|
124
+
|`{ENDPOINT_URI}`| The endpoint for authenticating your service request. You can find it on your resource's **Key and endpoint** page, on the Azure portal.<br/><br/>For example: `https://<your-resource-name>.cognitiveservices.azure.com`|
125
+
|`{API_KEY}`| The key for your Speech resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. |
126
+
|`{CONTAINER_LICENSE_DIRECTORY}`| Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory`|
127
+
128
+
```bash
129
+
docker run --rm -it -p 5000:5000 \
130
+
-v {LICENSE_MOUNT} \
131
+
{IMAGE} \
132
+
eula=accept \
133
+
billing={ENDPOINT_URI} \
134
+
apikey={API_KEY} \
135
+
DownloadLicense=True \
136
+
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
137
+
```
138
+
139
+
Once the license file has been downloaded, you can run the container in a disconnected environment. The following example shows the formatting of the `docker run` command you'll use, with placeholder values. Replace these placeholder values with your own values.
140
+
141
+
Wherever the container is run, the license file must be mounted to the container and the location of the license folder on the container's local filesystem must be specified with `Mounts:License=`. An output mount must also be specified so that billing usage records can be written.
142
+
143
+
Placeholder | Value | Format or example |
144
+
|-------------|-------|---|
145
+
|`{IMAGE}`| The container image you want to use.<br/><br/>For example: `mcr.microsoft.com/azure-cognitive-services/speech-to-text`|
146
+
`{MEMORY_SIZE}` | The appropriate size of memory to allocate for your container.<br/><br/>For example: `4g` |
147
+
|`{NUMBER_CPUS}`| The appropriate number of CPUs to allocate for your container.<br/><br/>For example: `4`|
148
+
|`{LICENSE_MOUNT}`| The path where the license will be located and mounted.<br/><br/>For example: `/host/license:/path/to/license/directory`|
149
+
|`{OUTPUT_PATH}`| The output path for logging [usage records](../containers/disconnected-containers.md#usage-records).<br/><br/>For example: `/host/output:/path/to/output/directory`|
150
+
|`{CONTAINER_LICENSE_DIRECTORY}`| Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory`|
151
+
|`{CONTAINER_OUTPUT_DIRECTORY}`| Location of the output folder on the container's local filesystem.<br/><br/>For example: `/path/to/output/directory`|
Speech containers provide a default directory for writing the license file and billing log at runtime. The default directories are /license and /output respectively.
164
+
165
+
When you're mounting these directories to the container with the `docker run -v` command, make sure the local machine directory is set ownership to `user:group nonroot:nonroot` before running the container.
166
+
167
+
Below is a sample command to set file/directory ownership.
For more information about `docker run` with Speech containers, see [Install and run Speech containers with Docker](speech-container-howto.md#run-the-container).
Increasing the number of concurrent calls can affect reliability and latency. For language identification, we recommend a maximum of four concurrent calls using 1 CPU with 1 GB of memory. For hosts with 2 CPUs and 2 GB of memory, we recommend a maximum of six concurrent calls.
0 commit comments