Skip to content

Commit e649cd8

Browse files
committed
Learn Editor: Update speech-container-batch-processing.md
1 parent 3d348d6 commit e649cd8

File tree

1 file changed

+24
-20
lines changed

1 file changed

+24
-20
lines changed

articles/cognitive-services/Speech-Service/speech-container-batch-processing.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,29 +44,30 @@ docker pull docker.io/batchkit/speech-batch-kit:latest
4444

4545
The batch client takes a yaml configuration file that specifies the on-prem container endpoints. The following example can be written to `/mnt/my_nfs/config.yaml`, which is used in the examples below.
4646

47+
4748
```yaml
48-
MyContainer1:
49-
concurrency: 5
50-
host: 192.168.0.100
51-
port: 5000
52-
rtf: 3
53-
MyContainer2:
54-
concurrency: 5
55-
host: BatchVM0.corp.redmond.microsoft.com
56-
port: 5000
57-
rtf: 2
58-
MyContainer3:
59-
concurrency: 10
60-
host: localhost
61-
port: 6001
62-
rtf: 4
49+
MyContainer1:
50+
concurrency: 5
51+
host: 192.168.0.100
52+
port: 5000
53+
rtf: 3
54+
MyContainer2:
55+
concurrency: 5
56+
host: BatchVM0.corp.redmond.microsoft.com
57+
port: 5000
58+
rtf: 2
59+
MyContainer3:
60+
concurrency: 10
61+
host: localhost
62+
port: 6001
63+
rtf: 4
6364
```
6465
6566
This yaml example specifies three speech containers on three hosts. The first host is specified by a IPv4 address, the second is running on the same VM as the batch-client, and the third container is specified by the DNS hostname of another VM. The `concurrency` value specifies the maximum concurrent file transcriptions that can run on the same container. The `rtf` (Real-Time Factor) value is optional, and can be used to tune performance.
66-
6767
The batch client can dynamically detect if an endpoint becomes unavailable (for example, due to a container restart or networking issue), and when it becomes available again. Transcription requests will not be sent to containers that are unavailable, and the client will continue using other available containers. You can add, remove, or edit endpoints at any time without interrupting the progress of your batch.
6868

6969

70+
7071
## Run the batch processing container
7172
7273
> [!NOTE]
@@ -76,20 +77,23 @@ The batch client can dynamically detect if an endpoint becomes unavailable (for
7677

7778
Use the Docker `run` command to start the container. This will start an interactive shell inside the container.
7879

80+
7981
```Docker
80-
docker run --rm -ti-v /mnt/my_nfs:/my_nfs--entrypoint/bin/bash/mnt/my_nfs:/my_nfsdocker.io/batchkit/speech-batch-kit:latest
82+
docker run --rm -ti -v /mnt/my_nfs:/my_nfs --entrypoint /bin/bash /mnt/my_nfs:/my_nfs docker.io/batchkit/speech-batch-kit:latest
8183
```
8284

8385
To run the batch client:
8486

87+
8588
```Docker
86-
run-batch-client-config/my_nfs/config.yaml-input_folder/my_nfs/audio_files-output_folder/my_nfs/transcriptions -log_folder /my_nfs/logs-file_log_levelDEBUG -nbest 1 -m ONESHOT-diarization None-languageen-US-strict_config  
89+
run-batch-client -config /my_nfs/config.yaml -input_folder /my_nfs/audio_files -output_folder /my_nfs/transcriptions -log_folder /my_nfs/logs -file_log_level DEBUG -nbest 1 -m ONESHOT -diarization None -language en-US -strict_config
8790
```
8891

8992
To run the batch client and container in a single command:
9093

94+
9195
```Docker
92-
docker run --rm -ti-v /mnt/my_nfs:/my_nfsdocker.io/batchkit/speech-batch-kit:latest  -config/my_nfs/config.yaml-input_folder/my_nfs/audio_files-output_folder/my_nfs/transcriptions -log_folder /my_nfs/logs-file_log_levelDEBUG -nbest 1 -m ONESHOT-diarization None-languageen-US-strict_config  
96+
docker run --rm -ti -v /mnt/my_nfs:/my_nfs docker.io/batchkit/speech-batch-kit:latest -config /my_nfs/config.yaml -input_folder /my_nfs/audio_files -output_folder /my_nfs/transcriptions -log_folder /my_nfs/logs -file_log_level DEBUG -nbest 1 -m ONESHOT -diarization None -language en-US -strict_config
9397
```
9498

9599

@@ -147,7 +151,6 @@ The batch processing kit offers three modes, using the `--run-mode` parameter.
147151
5. Logs and the Speech container output are returned to the specified output directory.
148152

149153
---
150-
151154
## Logging
152155

153156
> [!NOTE]
@@ -160,3 +163,4 @@ The output directory specified by `-output_folder` will contain a *run_summary.j
160163
## Next steps
161164

162165
* [How to install and run containers](speech-container-howto.md)
166+

0 commit comments

Comments
 (0)