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
The following table represents the various `docker run` parameters and their corresponding descriptions:
12
+
13
+
| Parameter | Description |
14
+
|---------|---------|
15
+
| `{VOLUME_MOUNT}` | The host computer [volume mount](https://docs.docker.com/storage/volumes/), which Docker uses to persist the custom model. An example is `c:\CustomSpeech` where the `c:\` drive is located on the host machine. |
16
+
| `{MODEL_ID}` | The custom speech or base model ID. For more information, see [Get the model ID](#get-the-model-id). |
17
+
| `{ENDPOINT_URI}` | The endpoint is required for metering and billing. For more information, see [billing arguments](speech-container-howto.md#billing-arguments). |
18
+
| `{API_KEY}` | The API key is required. For more information, see [billing arguments](speech-container-howto.md#billing-arguments). |
19
+
20
+
When you run the custom speech-to-text container, configure the port, memory, and CPU according to the custom speech-to-text container [requirements and recommendations](speech-container-howto.md#container-requirements-and-recommendations).
21
+
22
+
Here's an example `docker run` command with placeholder values. You must specify the `VOLUME_MOUNT`, `MODEL_ID`, `ENDPOINT_URI`, and `API_KEY` values:
* Runs a custom speech-to-text container from the container image.
37
+
* Allocates 4 CPU cores and 8 GB of memory.
38
+
* Loads the custom speech-to-text model from the volume input mount, for example, *C:\CustomSpeech*.
39
+
* Exposes TCP port 5000 and allocates a pseudo-TTY for the container.
40
+
* Downloads the model given the `ModelId` (if not found on the volume mount).
41
+
* If the custom model was previously downloaded, the `ModelId` is ignored.
42
+
* Automatically removes the container after it exits. The container image is still available on the host computer.
43
+
44
+
For more information about `docker run` with Speech containers, see [Install and run Speech containers with Docker](speech-container-howto.md#run-the-container).
Copy file name to clipboardExpand all lines: articles/cognitive-services/Speech-Service/includes/containers-speech-config-http.md
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@ ms.subservice: speech-service
6
6
ms.topic: include
7
7
ms.date: 04/06/2023
8
8
ms.author: eur
9
-
ms.custom: devx-track-csharp
10
9
---
11
10
12
11
Speech containers provide websocket-based query endpoint APIs that are accessed through the Speech SDK. By default, the Speech SDK uses the public Speech service. To use the container, you need to change the initialization method.
For information about how to configure the Speech CLI, see [Get started with the Azure Speech CLI](../spx-basics.md?tabs=dockerinstall#download-and-install).
Copy file name to clipboardExpand all lines: articles/cognitive-services/Speech-Service/includes/containers-speech-config-ws.md
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@ ms.subservice: speech-service
6
6
ms.topic: include
7
7
ms.date: 04/06/2023
8
8
ms.author: eur
9
-
ms.custom: devx-track-csharp
10
9
---
11
10
12
11
Speech containers provide websocket-based query endpoint APIs that are accessed through the Speech SDK. By default, the Speech SDK uses the public Speech service. To use the container, you need to change the initialization method.
For information about how to configure the Speech CLI, see [Get started with the Azure Speech CLI](../spx-basics.md?tabs=dockerinstall#download-and-install).
> The `locale` and `voice` for custom Speech containers is determined by the custom model ingested by the container.
76
76
77
+
## Get the model ID
77
78
78
-
## Get the custom model ID
79
+
Before you can [run](#run-the-container-with-docker-run) the container, you need to know the model ID of your custom model or a base model ID. When you run the container you specify one of the model IDs to download and use.
79
80
80
-
The custom speech-to-text container relies on a Custom Speech model. The custom model has to have been [trained](how-to-custom-speech-train-model.md) by using the [Speech Studio](https://aka.ms/speechstudio/customspeech).
81
+
# [Custom model ID](#tab/custom-model)
81
82
82
-
The custom speech **Model ID** is required to run the container. For more information about how to get the model ID, see [Custom Speech model lifecycle](how-to-custom-speech-model-and-endpoint-lifecycle.md).
83
+
The custom model has to have been [trained](how-to-custom-speech-train-model.md) by using the [Speech Studio](https://aka.ms/speechstudio/customspeech). For information about how to get the model ID, see [Custom Speech model lifecycle](how-to-custom-speech-model-and-endpoint-lifecycle.md).
83
84
84
85

85
86
86
87
Obtain the **Model ID** to use as the argument to the `ModelId` parameter of the `docker run` command.
87
88
88
89

89
90
90
-
## Run the container with docker run
91
-
92
-
Use the [docker run](https://docs.docker.com/engine/reference/commandline/run/) command to run the container.
93
-
94
-
# [Custom speech to text](#tab/container)
95
-
96
-
The following table represents the various `docker run` parameters and their corresponding descriptions:
97
91
98
-
| Parameter | Description |
99
-
|---------|---------|
100
-
|`{VOLUME_MOUNT}`| The host computer [volume mount](https://docs.docker.com/storage/volumes/), which Docker uses to persist the custom model. An example is `c:\CustomSpeech` where the `c:\` drive is located on the host machine. |
101
-
|`{MODEL_ID}`| The custom speech model ID. For more information, see [Get the custom model ID](#get-the-custom-model-id). |
102
-
|`{ENDPOINT_URI}`| The endpoint is required for metering and billing. For more information, see [billing arguments](speech-container-howto.md#billing-arguments). |
103
-
|`{API_KEY}`| The API key is required. For more information, see [billing arguments](speech-container-howto.md#billing-arguments). |
92
+
# [Base model ID](#tab/custom-model)
104
93
105
-
When you run the custom speech-to-text container, configure the port, memory, and CPU according to the custom speech-to-text container [requirements and recommendations](speech-container-howto.md#container-requirements-and-recommendations).
94
+
You can get the available base model information by using option `BaseModelLocale={LOCALE}`. This option gives you a list of available base models on that locale under your billing account.
106
95
107
-
Here's an example `docker run` command with placeholder values. You must specify the `VOLUME_MOUNT`, `MODEL_ID`, `ENDPOINT_URI`, and `API_KEY` values:
* Runs a custom speech-to-text container from the container image.
122
-
* Allocates 4 CPU cores and 8 GB of memory.
123
-
* Loads the custom speech-to-text model from the volume input mount, for example, *C:\CustomSpeech*.
124
-
* Exposes TCP port 5000 and allocates a pseudo-TTY for the container.
125
-
* Downloads the model given the `ModelId` (if not found on the volume mount).
126
-
* If the custom model was previously downloaded, the `ModelId` is ignored.
127
-
* Automatically removes the container after it exits. The container image is still available on the host computer.
128
-
129
-
For more information about `docker run` with Speech containers, see [Install and run Speech containers with Docker](speech-container-howto.md#run-the-container).
130
-
131
-
### Base model download on the custom speech-to-text container
132
-
133
-
You can get the available base model information by using option `BaseModelLocale={LOCALE}`. This option gives you a list of available base models on that locale under your billing account. For example:
96
+
To get base model IDs, you use the `docker run` command. For example:
134
97
135
98
```bash
136
99
docker run --rm -it \
@@ -141,12 +104,13 @@ Billing={ENDPOINT_URI} \
141
104
ApiKey={API_KEY}
142
105
```
143
106
144
-
This command:
107
+
This command checks the container image and returns the available base models of the target locale.
108
+
109
+
> [!NOTE]
110
+
> Although you use the `docker run` command, the container isn't started for service.
145
111
146
-
* Runs a custom speech-to-text container from the container image.
147
-
* Checks and returns the available base models of the target locale.
112
+
The output gives you a list of base models with the information locale, model ID, and creation date time. For example:
148
113
149
-
The output gives you a list of base models with the information locale, model ID, and creation date time. You can use the model ID to download and use the specific base model you prefer. For example:
150
114
```
151
115
Checking available base model for en-us
152
116
2020/10/30 21:54:20 [Info] Searching available base models for en-us
@@ -164,12 +128,14 @@ Checking available base model for en-us
164
128
2020/10/30 21:54:21 [Fatal] Please run this tool again and assign --modelId '<one above base model id>'. If no model id listed above, it means currently there is no available base model for en-us
165
129
```
166
130
167
-
### Display model download on the custom speech-to-text container
131
+
---
132
+
133
+
## Display model download
168
134
169
-
You can get the available display models information and choose to download those models into your speech-to-text container to get highly improved final display output.
135
+
Before you [run](#run-the-container-with-docker-run) the container, you can optionally get the available display models information and choose to download those models into your speech-to-text container to get highly improved final display output. Display model download is available with custom-speech-to-text container version 3.1.0 and later.
170
136
171
-
> [!NOTE]
172
-
> Display model download is available with custom-speech-to-text container version 3.1.0 and later.
137
+
> [!NOTE]
138
+
> Although you use the `docker run` command, the container isn't started for service.
173
139
174
140
You can query or download any or all of these display model types: Rescoring (`Rescore`), Punctuation (`Punct`), resegmentation (`Resegment`), and wfstitn (`Wfstitn`). Otherwise, you can use the `FullDisplay` option (with or without the other types) to query or download all types of display models.
175
141
@@ -211,20 +177,41 @@ ApiKey={API_KEY}
211
177
> [!NOTE]
212
178
> 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).
213
179
180
+
## Run the container with docker run
181
+
182
+
Use the [docker run](https://docs.docker.com/engine/reference/commandline/run/) command to run the container for service.
# [Disconnected custom speech to text](#tab/disconnected)
215
189
216
190
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) in the Azure Cognitive Services documentation.
217
191
218
192
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
193
220
-
In order to prepare and configure the Custom Speech-to-Text container you will need two separate speech resources:
194
+
In order to prepare and configure a disconnected custom speech-to-text container you will need two separate speech resources:
221
195
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 is 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.
196
+
- 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 is used to train, download, and configure your custom speech models for use in your container.
197
+
- 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
198
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.
199
+
Follow these steps to download and run the container in disconnected environments.
200
+
1.[Download a model for the disconnected container](#download-a-model-for-the-disconnected-container). For this step, use 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.
201
+
1.[Download the disconnected container license](#download-the-disconnected-container-license). For this step, use an Azure Speech Service resource which is configured to use the "**DC0 Commitment (Disconnected)**" pricing plan.
202
+
1.[Run the disconnected container for service](#run-the-disconnected-container). For this step, use an Azure Speech Service resource which is configured to use the "**DC0 Commitment (Disconnected)**" pricing plan.
226
203
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 `neural-text-to-speech` container.
204
+
### Download a model for the disconnected container
205
+
206
+
For this step, use 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.
Next, you download your disconnected license file. 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.
213
+
214
+
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.
228
215
229
216
| Placeholder | Description |
230
217
|-------------|-------|
@@ -234,6 +221,8 @@ The `DownloadLicense=True` parameter in your `docker run` command will download
234
221
|`{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
222
|`{CONTAINER_LICENSE_DIRECTORY}`| Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory`|
236
223
224
+
For this step, use an Azure Speech Service resource which is configured to use the "**DC0 Commitment (Disconnected)**" pricing plan.
225
+
237
226
```bash
238
227
docker run --rm -it -p 5000:5000 \
239
228
-v {LICENSE_MOUNT} \
@@ -245,6 +234,8 @@ DownloadLicense=True \
245
234
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
246
235
```
247
236
237
+
### Run the disconnected container
238
+
248
239
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
240
250
241
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.
@@ -262,6 +253,8 @@ Wherever the container is run, the license file must be mounted to the container
262
253
|`{OUTPUT_PATH}`| The output path for logging.<br/><br/>For example: `/host/output:/path/to/output/directory`<br/><br/>For more information, see [usage records](../containers/disconnected-containers.md#usage-records) in the Azure Cognitive Services documentation. |
263
254
|`{MODEL_PATH}`| The path where the model is located.<br/><br/>For example: `/path/to/model/`|
264
255
256
+
For this step, use an Azure Speech Service resource which is configured to use the "**DC0 Commitment (Disconnected)**" pricing plan.
#### Custom pronunciation on the custom speech-to-text container
281
+
282
+
### Custom pronunciation on the custom speech-to-text container
289
283
290
284
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.
0 commit comments