This is the docker image used for building a docker container that has Cognitive Speech Service clients built in.
This docker image includes two clients:
| Client | Description |
|---|---|
speech-to-text-client | The client to hit speech-to-text service |
text-to-speech-client | The client to hit text-to-speech service |
single-language-detection-client | The client to hit speech-language-detection service |
continuous-language-detection-client | The client to hit speech-language-detection service |
speech-to-text-with-languagedetection-client | The client to hit both speech-to-text and speech-language-detection service |
Both of these clients are implemented in Python3.x.
speech-to-text-client is implemented based on Speech SDK
text-to-speech-client is as REST API Client
single-language-detection-client is implemented based on Speech SDK
continuous-language-detection-client is implemented based on Speech SDK
speech-to-text-with-languagedetection-client is implemented based on Speech SDK
This image has been published to docker.io/antsu/on-prem-client:latest for public.
azure-cognitiveservices-speechis updated to latest version: 1.18.01.18 tag version is added, which uses Speech SDK 1.18 (Note: speech-to-text clientuses dictation api only)1.11 tag version is added, which uses Speech SDK 1.11 (Note: speech-to-text clientuses dictation api only)1.8 tag version is added, which uses Speech SDK 1.8 (Note: speech-to-text clientuses dictation api only)1.7 tag version is added, which uses Speech SDK 1.7 (Note: speech-to-text clientuses dictation api only)To run client, use docker run command, i.e.
docker run --rm -ti <YOUR_IMAGE_URI>:<YOUR_IMAGE_TAG> ./speech-to-text-client --host 51.143.123.142 --port 80 --expect "What's the weather like" ./audio/whatstheweatherlike.wav
Run ./speech-to-text-client -h, you can get an instruction on how to use each argument/option.
Note:
- [Linux users] If you run speech-to-text docker container and this test client container on the same local host, you should add
--network=hostin the command above before image, to enable the test client docker container using the local host networking.
[Mac/Windows users]--network=hostis not needed. Please add argument--macorwindowsafter image instead to indicate which platform the container is running on.- If you want to use your own local audio file instead of the image-included
whatstheweatherlike.wav, you should mount local directory to docker to make it able to reach your local audio files.
To do that, add-v <YOUR_LOCAL_AUDIO_FILE_DIR>:<DOCKER_DIR_YOU_WANT_TO_MOUNT_TO>in the command above before image.
| Argument | Short | Description | Required | Default | Sample |
|---|---|---|---|---|---|
| --host | -ho | Specifies the speech-to-text service host | use with --port | 5000 | 51.143.123.142 |
| --port | -po | Specifies the speech-to-text service port | use with --host | local | 80 |
| --region | -r | Specifies the region of Azure subscription. Default is local, which indicates using host:port as service endpoint.If provided value of valid region (i.e. westus), a valid Azure subscription is required at the same time | use with --subscription | local | westus |
| --subscription | -s | Specifies the Azure subscription | use with --region | 00000000000000000000000000000000 | A356AC8C-E310-44F4-BF85-C7F29044AF99 |
| --expect | -exp | Specifies the expected text result of STT | optional | What's the weather like | |
wav_file | Specifies the audio file path. A sample audio file is provided in this image: ./audio/whatstheweatherlike.wav.To use your own audio file, put it under ./audio or other dicretory you want. Docker image rebuilt is required. | yes | ./audio/whatstheweatherlike.wav |
To run client, use docker run command, i.e.
docker run --rm -v ${HOME}:/root -ti <YOUR_IMAGE_URI>:<YOUR_IMAGE_TAG> ./text-to-speech-client --host 51.143.123.142 --port 80 -i "what is that"
Run ./text-to-speech-client -h, you can get an instruction on how to use each argument/option.
Note:
- [Linux users] If you run text-to-speech docker container and this test client container on the same local host, you should add
--network=hostin the command above before image, to enable the test client docker container using the local host networking.
[Mac/Windows users]--network=hostis not needed. Please add argument--macorwindowsafter image instead to indicate which platform the container is running on.
| Argument | Short | Description | Required | Default | Sample |
|---|---|---|---|---|---|
| --host | -ho | Specifies the text-to-speech service host | use with --port | 5000 | 51.143.123.142 |
| --port | -po | Specifies the text-to-speech service port | use with --host | local | 80 |
| --voicename | -vn | Specifies the voice name to hit text-to-speech service | optional | JessaRUS | JessaRUS |
| --locale | -l | Specifies the locale of text input | optional | en-US | en-US |
| --region | -r | Specifies the region of Azure subscription. Default is local, which indicates using host:port as service endpoint.If provided value of valid region (i.e. westus), a valid Azure subscription is required at the same time | use with --subscription | local | westus |
| --subscription | -s | Specifies the Azure subscription | use with --region | 00000000000000000000000000000000 | A356AC8C-E310-44F4-BF85-C7F29044AF99 |
| --input | -i | Specifies the text input | optional, -i or -if must have one of them | What is that | |
| --inputfile | -if | Specifies the path of input text file | optional, -i or -if must have one of them | ~/path/to/text/input | |
| --resourcename | -rn | Specifies the Azure source name | use with --subscription | fake_resource_name |
To run client, use docker run command, i.e.
docker run --rm -v ${HOME}:/root -ti <YOUR_IMAGE_URI>:<YOUR_IMAGE_TAG> ./speech-to-text-with-languagedetection-client <wav_file> --host 51.143.123.142 --lport 5003 --sport 5000
Run ./single-language-detection-client -h, you can get an instruction on how to use each argument/option.
Note:
- [Linux users] If you run speech-to-text-with-languagedetection docker container and this test client container on the same local host, you should add
--network=hostin the command above before image, to enable the test client docker container using the local host networking.
[Mac/Windows users]--network=hostis not needed. Please add argument--macorwindowsafter image instead to indicate which platform the container is running on.
Note:
the wav_file for the Language Detection is recommeded for more than 5 seconds of speech, if the audio has less than 5 seconds, Langauge Detection may fail.
| Argument | Short | Description | Required | Default | Sample |
|---|---|---|---|---|---|
| --host | -ho | Specifies the speech-to-text-with-languagedetection service host | use with --lport and --sport | 5000 and 5003 | 51.143.123.142 |
| --subscription | -s | Specifies the Azure subscription | use with --region | 00000000000000000000000000000000 | A356AC8C-E310-44F4-BF85-C7F29044AF99 |
| --port | -p | Specifies the speech-to-text-with-languagedetection service port | use with --host | local | 5003 |
| --languagepriority | -lp | Specifies the speech-to-text-with-languagedetection service single languageId priority | Latency or Accuracy | Latency | |
| --input | -i | Specifies the text input | optional, -i or -if must have one of them | What is that | |
wav_file | Specifies the audio file path. A sample audio file is provided in this image: ./audio/whatstheweatherlike.wav.To use your own audio file, put it under ./audio or other dicretory you want. Docker image rebuilt is required. | yes | ./audio/whatstheweatherlike.wav |
Run ./continuous-language-detection-client -h, you can get an instruction on how to use each argument/option.
Note:
- [Linux users] If you run speech-to-text-with-languagedetection docker container and this test client container on the same local host, you should add
--network=hostin the command above before image, to enable the test client docker container using the local host networking.
[Mac/Windows users]--network=hostis not needed. Please add argument--macorwindowsafter image instead to indicate which platform the container is running on.
Note:
the wav_file for the Language Detection is recommeded for more than 5 seconds of speech, if the audio has less than 5 seconds, Langauge Detection may fail.
| Argument | Short | Description | Required | Default | Sample |
|---|---|---|---|---|---|
| --host | -ho | Specifies the speech-to-text-with-languagedetection service host | use with --lport and --sport | 5000 and 5003 | 51.143.123.142 |
| --subscription | -s | Specifies the Azure subscription | use with --region | 00000000000000000000000000000000 | A356AC8C-E310-44F4-BF85-C7F29044AF99 |
| --port | -p | Specifies the speech-to-text-with-languagedetection service port | use with --host | local | 5003 |
| --languagepriority | -lp | Specifies the speech-to-text-with-languagedetection service continuous languageId priority | Latency or Accuracy | Latency | |
| --input | -i | Specifies the text input | optional, -i or -if must have one of them | What is that | |
wav_file | Specifies the audio file path. A sample audio file is provided in this image: ./audio/LanguageDetection_continuous_en-us.wav.To use your own audio file, put it under ./audio or other dicretory you want. Docker image rebuilt is required. | yes | ./audio/whatstheweatherlike.wav |
Run ./speech-to-text-with-languagedetection-client -h, you can get an instruction on how to use each argument/option.
Note:
- [Linux users] If you run speech-to-text-with-languagedetection docker container and this test client container on the same local host, you should add
--network=hostin the command above before image, to enable the test client docker container using the local host networking.
[Mac/Windows users]--network=hostis not needed. Please add argument--macorwindowsafter image instead to indicate which platform the container is running on.
Note:
the wav_file for the Language Detection is recommeded for more than 5 seconds of speech, if the audio has less than 5 seconds, Langauge Detection may fail.
| Argument | Short | Description | Required | Default | Sample |
|---|---|---|---|---|---|
| --host | -ho | Specifies the speech-to-text-with-languagedetection service host | use with --lport and --sport | 5000 and 5003 | 51.143.123.142 |
| --subscription | -s | Specifies the Azure subscription | use with --region | 00000000000000000000000000000000 | A356AC8C-E310-44F4-BF85-C7F29044AF99 |
| --lport | -lp | Specifies the speech-to-text-with-languagedetection service port | use with --host | local | 5003 |
| --sport | -lp | Specifies the speech-to-text-with-languagedetection service port | use with --host | local | 5000 |
| --input | -i | Specifies the text input | optional, -i or -if must have one of them | What is that | |
wav_file | Specifies the audio file path. A sample audio file is provided in this image: ./audio/whatstheweatherlike.wav.To use your own audio file, put it under ./audio or other dicretory you want. Docker image rebuilt is required. | yes | ./audio/whatstheweatherlike.wav |
To remove clients, just remove the docker image.
docker rmi <IMAGE_ID>
Content type
Image
Digest
Size
209.2 MB
Last updated
about 5 years ago
docker pull antsu/on-prem-client