Skip to content

Commit 7766ee7

Browse files
committed
tabs for disconnected etc
1 parent d7494f5 commit 7766ee7

File tree

11 files changed

+108
-78
lines changed

11 files changed

+108
-78
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
author: eric-urban
3+
manager: nitinme
4+
ms.service: cognitive-services
5+
ms.subservice: speech-service
6+
ms.topic: include
7+
ms.date: 04/06/2023
8+
ms.author: eur
9+
---
10+
11+
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:
23+
24+
```bash
25+
docker run --rm -it -p 5000:5000 --memory 8g --cpus 4 \
26+
-v {VOLUME_MOUNT}:/usr/local/models \
27+
mcr.microsoft.com/azure-cognitive-services/speechservices/custom-speech-to-text \
28+
ModelId={MODEL_ID} \
29+
Eula=accept \
30+
Billing={ENDPOINT_URI} \
31+
ApiKey={API_KEY}
32+
```
33+
34+
This command:
35+
36+
* 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).

articles/cognitive-services/Speech-Service/includes/containers-speech-config-http.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ ms.subservice: speech-service
66
ms.topic: include
77
ms.date: 04/06/2023
88
ms.author: eur
9-
ms.custom: devx-track-csharp
109
---
1110

1211
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.
@@ -129,10 +128,6 @@ speech_config = speechsdk.SpeechConfig(
129128
```
130129
::: zone-end
131130

132-
::: zone pivot="programming-language-rest"
133-
Set the host to `"http://localhost:5000"`
134-
::: zone-end
135-
136131
::: zone pivot="programming-language-cli"
137132
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).
138133
::: zone-end

articles/cognitive-services/Speech-Service/includes/containers-speech-config-ws.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ ms.subservice: speech-service
66
ms.topic: include
77
ms.date: 04/06/2023
88
ms.author: eur
9-
ms.custom: devx-track-csharp
109
---
1110

1211
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.
@@ -129,10 +128,6 @@ speech_config = speechsdk.SpeechConfig(
129128
```
130129
::: zone-end
131130

132-
::: zone pivot="programming-language-rest"
133-
Set the host to `"ws://localhost:5000"`
134-
::: zone-end
135-
136131
::: zone pivot="programming-language-cli"
137132
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).
138133
::: zone-end

articles/cognitive-services/Speech-Service/includes/release-notes/release-notes-containers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ Bug fixes for [speech-language-detection](~/articles/cognitive-services/speech-s
163163
### 2022-March release
164164

165165
#### Custom speech-to-text Container v3.1.0
166-
Add support to [get display models](../../speech-container-cstt.md#display-model-download-on-the-custom-speech-to-text-container).
166+
Add support to [get display models](../../speech-container-cstt.md#display-model-download).
167167

168168
### 2022-January release
169169

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

Lines changed: 53 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.subservice: speech-service
1010
ms.topic: how-to
1111
ms.date: 04/06/2023
1212
ms.author: eur
13-
zone_pivot_groups: programming-languages-speech-services
13+
zone_pivot_groups: programming-languages-speech-sdk-cli
1414
keywords: on-premises, Docker, container
1515
---
1616

@@ -74,63 +74,26 @@ docker pull mcr.microsoft.com/azure-cognitive-services/speechservices/custom-spe
7474
> [!NOTE]
7575
> The `locale` and `voice` for custom Speech containers is determined by the custom model ingested by the container.
7676
77+
## Get the model ID
7778

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.
7980

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)
8182

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).
8384

8485
![Screenshot that shows the Custom Speech training page.](media/custom-speech/custom-speech-model-training.png)
8586

8687
Obtain the **Model ID** to use as the argument to the `ModelId` parameter of the `docker run` command.
8788

8889
![Screenshot that shows Custom Speech model details.](media/custom-speech/custom-speech-model-details.png)
8990

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:
9791

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)
10493

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.
10695

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:
108-
109-
```bash
110-
docker run --rm -it -p 5000:5000 --memory 8g --cpus 4 \
111-
-v {VOLUME_MOUNT}:/usr/local/models \
112-
mcr.microsoft.com/azure-cognitive-services/speechservices/custom-speech-to-text \
113-
ModelId={MODEL_ID} \
114-
Eula=accept \
115-
Billing={ENDPOINT_URI} \
116-
ApiKey={API_KEY}
117-
```
118-
119-
This command:
120-
121-
* 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:
13497

13598
```bash
13699
docker run --rm -it \
@@ -141,12 +104,13 @@ Billing={ENDPOINT_URI} \
141104
ApiKey={API_KEY}
142105
```
143106

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.
145111
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:
148113

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:
150114
```
151115
Checking available base model for en-us
152116
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
164128
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
165129
```
166130

167-
### Display model download on the custom speech-to-text container
131+
---
132+
133+
## Display model download
168134

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.
170136

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.
173139
174140
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.
175141

@@ -211,20 +177,41 @@ ApiKey={API_KEY}
211177
> [!NOTE]
212178
> 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).
213179
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.
183+
184+
# [Custom speech to text](#tab/container)
185+
186+
[!INCLUDE [Custom speech container run](includes/containers-cstt-common-run.md)]
187+
214188
# [Disconnected custom speech to text](#tab/disconnected)
215189

216190
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.
217191

218192
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.
219193

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:
221195

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.
224198

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.
226203

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.
207+
208+
[!INCLUDE [Custom speech container run](includes/containers-cstt-common-run.md)]
209+
210+
### Download the disconnected container license
211+
212+
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.
228215

229216
| Placeholder | Description |
230217
|-------------|-------|
@@ -234,6 +221,8 @@ The `DownloadLicense=True` parameter in your `docker run` command will download
234221
| `{API_KEY}` | The key for your Speech resource. You can find it on your resource's **Key and endpoint** page, on the Azure portal. |
235222
| `{CONTAINER_LICENSE_DIRECTORY}` | Location of the license folder on the container's local filesystem.<br/><br/>For example: `/path/to/license/directory` |
236223

224+
For this step, use an Azure Speech Service resource which is configured to use the "**DC0 Commitment (Disconnected)**" pricing plan.
225+
237226
```bash
238227
docker run --rm -it -p 5000:5000 \
239228
-v {LICENSE_MOUNT} \
@@ -245,6 +234,8 @@ DownloadLicense=True \
245234
Mounts:License={CONTAINER_LICENSE_DIRECTORY}
246235
```
247236

237+
### Run the disconnected container
238+
248239
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.
249240

250241
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
262253
| `{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. |
263254
| `{MODEL_PATH}` | The path where the model is located.<br/><br/>For example: `/path/to/model/` |
264255

256+
For this step, use an Azure Speech Service resource which is configured to use the "**DC0 Commitment (Disconnected)**" pricing plan.
257+
265258
```bash
266259
docker run --rm -it -p 5000:5000 --memory {MEMORY_SIZE} --cpus {NUMBER_CPUS} \
267260
-v {LICENSE_MOUNT} \
@@ -285,7 +278,8 @@ sudo chown -R nonroot:nonroot <YOUR_LOCAL_MACHINE_PATH_1> <YOUR_LOCAL_MACHINE_PA
285278

286279
---
287280

288-
#### Custom pronunciation on the custom speech-to-text container
281+
282+
### Custom pronunciation on the custom speech-to-text container
289283

290284
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.
291285

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.subservice: speech-service
1010
ms.topic: how-to
1111
ms.date: 04/06/2023
1212
ms.author: eur
13-
zone_pivot_groups: programming-languages-speech-services
13+
zone_pivot_groups: programming-languages-speech-sdk-cli
1414
keywords: on-premises, Docker, container
1515
---
1616

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.subservice: speech-service
1010
ms.topic: how-to
1111
ms.date: 04/06/2023
1212
ms.author: eur
13-
zone_pivot_groups: programming-languages-speech-services
13+
zone_pivot_groups: programming-languages-speech-sdk-cli
1414
keywords: on-premises, Docker, container
1515
---
1616

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.subservice: speech-service
1010
ms.topic: how-to
1111
ms.date: 04/06/2023
1212
ms.author: eur
13-
zone_pivot_groups: programming-languages-speech-services
13+
zone_pivot_groups: programming-languages-speech-sdk-cli
1414
keywords: on-premises, Docker, container
1515
---
1616

0 commit comments

Comments
 (0)