Installing Watson Speech services
A project administrator can install Watson Speech services on IBM Cloud Pak® for Data.
- What permissions do you need to complete this task?
- The permissions that you need depend on which tasks you must complete:
- To install the Watson Speech services operators, you must have the appropriate permissions to
create operators and you must be an administrator of the project where the Cloud Pak for Data operators are installed. This project is identified by
the
${PROJECT_CPD_OPS}
environment variable. - To install Watson Speech services, you must be an administrator of the project where you will
install Watson Speech services. This project is identified by the
${PROJECT_CPD_INSTANCE}
environment variable.
- To install the Watson Speech services operators, you must have the appropriate permissions to
create operators and you must be an administrator of the project where the Cloud Pak for Data operators are installed. This project is identified by
the
- When do you need to complete this task?
- If you didn't install Watson Speech services when you installed the platform, you can complete
this task to add Watson Speech services to your environment.
If you want to install all of the Cloud Pak for Data components at the same time, follow the process in Installing the platform and services instead.
Important: All of the Cloud Pak for Data components in a deployment must be installed at the same release.
Information you need to complete this task
Review the following information before you install Watson Speech services:
- Environment variables
- The commands in this task use environment variables so that you can run the commands exactly as
written.
- If you don't have the script that defines the environment variables, see Setting up installation environment variables.
- To use the environment variables from the script, you must source the environment variables
before you run the commands in this task, for
example:
source ./cpd_vars.sh
- Speech custom resource environment variable
- Many commands and procedures refer to the Watson Speech services custom resource. To avoid the need
to specify the name of the Speech custom resource whenever it is used, append the following lines to
the
cpd_vars.sh
script, and source the script to use the variable in your environment.# ------------------------------------------------------------------------------ # Watson Speech services # ------------------------------------------------------------------------------ # Set the following variable to the name of your Speech services custom resource (CR). # The variable is set to the default name of the custom resource for new installations. export CUSTOM_RESOURCE_SPEECH=speech-cr
As of version 4.5.x, the default recommended name of the Speech custom resource is
speech-cr
. For older versions, the default recommended name wasspeech-prod-cr
. Using the${CUSTOM_RESOURCE_SPEECH}
variable lets the commands and procedures work as written for all users.
- Security context constraint requirements
- Watson Speech services uses the
restricted
security context constraint (SCC).
- Installation location
- Watson Speech services must be installed in the same project
(namespace) as the Cloud Pak for Data control
plane. This project is
identified by the
${PROJECT_CPD_INSTANCE}
environment variable.
- Common core services
- Watson Speech services requires the Cloud Pak for Data
common core services.
If the common core services are not installed in the project where you plan to install Watson Speech services, the common core services are automatically installed when you install Watson Speech services. This increases the amount of time the installation takes to complete.
- Load balancer timeout settings
- Watson Speech services require that you change the load balancer timeout settings for both the server and client to 300 seconds. These settings ensure that long-running speech recognition requests, those with long or difficult audio, have sufficient time to complete. For more information, see Changing load balancer timeout settings.
- Storage requirements
- You must tell Watson Speech services what storage to use. The following storage classes are recommended. However, if you don't use these storage classes on your cluster, ensure that you specify a storage class with an equivalent definition.
Before you begin
This task assumes that the following prerequisites are met:
Prerequisite | Where to find more information |
---|---|
The cluster meets the minimum requirements for installing Watson Speech services. | If this task is not complete, see System requirements. |
The workstation from which you will run the installation is set up as a client workstation
and includes the following command-line interfaces:
|
If this task is not complete, see Setting up a client workstation. |
The Cloud Pak for Data control plane is installed. | If this task is not complete, see Installing the platform and services. |
For environments that use a private container registry, such as air-gapped environments, the Watson Speech services software images are mirrored to the private container registry. | If this task is not complete, see Mirroring images to a private container registry. |
Procedure
Complete the following tasks to install Watson Speech services:
Logging in to the cluster
To run cpd-cli
manage
commands, you must log in to the cluster.
To log in to the cluster:
-
Run the
cpd-cli manage login-to-ocp
command to log in to the cluster as a user with sufficient permissions to complete this task. For example:cpd-cli manage login-to-ocp \ --username=${OCP_USERNAME} \ --password=${OCP_PASSWORD} \ --server=${OCP_URL}
Tip: Thelogin-to-ocp
command takes the same input as theoc login
command. Runoc login --help
for details.
Installing the operator
The Watson Speech services operator simplifies the process of managing the Watson Speech services service on Red Hat® OpenShift Container Platform.
To install Watson Speech services, you must install the Watson Speech services operator and create the Operator Lifecycle Manager (OLM) objects, such as the catalog source and subscription, for the operator.
- Who needs to complete this task?
- You must be a cluster administrator (or a user with the appropriate permissions to install operators) to create the OLM objects.
- When do you need to complete this task?
- Complete this task if the Watson Speech services operator and other OLM artifacts have not been created for the current
release.
If you complete this task and the OLM artifacts already exist on the cluster, the
cpd-cli
detects that you already have the OLM objects for the components at the specified release, thecpd-cli
does not attempt to create the OLM objects again.
To install the operator:
- Create
the OLM objects for Watson Speech services:
cpd-cli manage apply-olm \ --release=${VERSION} \ --cpd_operator_ns=${PROJECT_CPD_OPS} \ --components=watson_speech
- If the command succeeds, it returns [SUCCESS]... The apply-olm command ran successfully.
- If the command fails, it returns [ERROR] and includes information about the cause of the failure.
What to do next: Install the Watson Speech services service.
Specifying additional installation options
When you install Watson Speech services, you indicate the microservices, models, and voices that are to be installed. You also indicate the size of the initial installation. The following table describes the options that are available for installation, including the default values that are used if you omit an option.
Keep in mind the following usage notes when installing the Watson Speech services:
You must install at least one of the microservices when you install the Watson Speech services. By default, the Speech to Text runtime (
watson_speech_enable_stt_runtime
) and Text to Speech runtime (watson_speech_enable_tts_runtime
) microservices are both installed.You cannot uninstall individual microservices once they are installed. This limitation applies when you make updates to the Speech installation and when you upgrade to a new version of the Watson Speech services. To remove any of the following microservices, you must uninstall the Watson Speech services in their entirety and reinstall only the microservices that you need:
- Speech to Text runtime (
watson_speech_enable_stt_runtime
) - Speech to Text asynchronous HTTP (
watson_speech_enable_stt_async
) - Speech to Text customization (
watson_speech_enable_stt_customization
) - Text to Speech runtime (
watson_speech_enable_tts_runtime
) - Text to Speech customization (
watson_speech_enable_tts_customization
)
- Speech to Text runtime (
You can change any of the other values later by editing the custom resource that is created during installation. The custom resource allows you to modify many aspects of your Watson Speech services installation an configuration. For more information about all properties of the custom resource, see Using the Watson Speech services custom resource.
Speech to Text models (
watson_speech_models
) and Text to Speech voices (watson_speech_voices
) are installed only if their corresponding runtimes (watson_speech_enable_stt_runtime
andwatson_speech_enable_tts_runtime
) are installed.
Option | Type | Description |
---|---|---|
watson_speech_enable_stt_runtime | boolean | Speech to Text runtime, the base microservice for speech recognition.
If
|
watson_speech_enable_stt_async | boolean | Speech to Text asynchronous HTTP. If
|
watson_speech_enable_stt_customization | boolean | Speech to Text customization. If
|
watson_speech_enable_tts_runtime | boolean | Text to Speech runtime, the base microservice for speech synthesis. If
|
watson_speech_enable_tts_customization | boolean | Text to Speech customization. If
|
watson_speech_models | string[] | Speech to Text models that are to be installed. The models are installed only if the Speech to Text runtime is installed. By default, the following US English models are installed:
|
watson_speech_voices | string[] | Text to Speech voices that are to be installed. The voices are installed only if the Text to Speech runtime is installed. By default, the following US English voices are installed:
|
watson_speech_stt_scale_config | string | Indicates the size of the Speech to Text configuration. Specify one of the following values:
|
watson_speech_tts_scale_config | string | Indicates the size of the Text to Speech configuration. Specify one of the following values:
|
To specify the advanced installation options for the Speech services, perform the following steps:
Create a file named install-options.yml in the working directory for the Cloud Pak for Data command-line interface, cpd-cli-workspace/olm-utils-workspace/work.
In the file, specify the Watson Speech services options and values that you want to install, as described in the previous table. For example, the following example file duplicates the default values from the table. (Because it uses the default values, the example simply duplicates the default behavior if it is included.)
watson_speech_enable_stt_runtime: true watson_speech_enable_stt_async: false watson_speech_enable_stt_customization: false watson_speech_enable_tts_runtime: true watson_speech_enable_tts_customization: false watson_speech_models: ["enUsBroadbandModel", "enUsNarrowbandModel", "enUsShortFormNarrowbandModel", "enUsTelephony", "enUsMultimedia"] watson_speech_voices: ["enUSAllisonV3Voice", "enUSLisaV3Voice", "enUSMichaelV3Voice"] watson_speech_stt_scale_config: "xsmall" watson_speech_tts_scale_config: "xsmall"
Tip: You can use the same file to provide input for multiple services. Each name is prefixed with the name of the Watson Speech services.Add the following line of input before the
--license_acceptance
entry of the./cpd-cli apply-cr
command:--param-file=/tmp/work/install-options.yml
Installing the service
After the Watson Speech services operator is installed, you can install Watson Speech services.
- Who needs to complete this task?
- You must be an administrator of the project where you will install Watson Speech services.
- When do you need to complete this task?
- Complete this task if you want to add Watson Speech services to your environment.
To install the service:
- Create the custom resource for Watson Speech services.
The command that you run depends on the storage on your cluster:
Red Hat OpenShift Data Foundation storage
Run the following command to create the custom resource.
cpd-cli manage apply-cr \ --components=watson_speech \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INSTANCE} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --license_acceptance=true
IBM Storage Fusion storage
Run the following command to create the custom resource.
Remember: When you use IBM Storage Fusion storage, both${STG_CLASS_BLOCK}
and${STG_CLASS_FILE}
point to the same storage class, typicallyibm-spectrum-scale-sc
.cpd-cli manage apply-cr \ --components=watson_speech \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INSTANCE} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --license_acceptance=true
IBM Storage Scale Container Native storage
Run the following command to create the custom resource.
Remember: When you use IBM Storage Scale Container Native storage, both${STG_CLASS_BLOCK}
and${STG_CLASS_FILE}
point to the same storage class, typicallyibm-spectrum-scale-sc
.cpd-cli manage apply-cr \ --components=watson_speech \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INSTANCE} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --license_acceptance=true
Portworx storage
cpd-cli manage apply-cr \ --components=watson_speech \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INSTANCE} \ --storage_vendor=portworx \ --license_acceptance=true
AWS with EFS and EBS storage
Run the following command to create the custom resource.
cpd-cli manage apply-cr \ --components=watson_speech \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INSTANCE} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --license_acceptance=true
IBM Cloud with IBM Cloud File Storage and IBM Cloud Block Storage
Run the following command to create the custom resource.
cpd-cli manage apply-cr \ --components=watson_speech \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INSTANCE} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --license_acceptance=true
NetApp Trident
Run the following command to create the custom resource.
Remember: When you use NetApp Trident storage, both${STG_CLASS_BLOCK}
and${STG_CLASS_FILE}
point to the same storage class.cpd-cli manage apply-cr \ --components=watson_speech \ --release=${VERSION} \ --cpd_instance_ns=${PROJECT_CPD_INSTANCE} \ --block_storage_class=${STG_CLASS_BLOCK} \ --file_storage_class=${STG_CLASS_FILE} \ --license_acceptance=true
Remember: To specify advanced installation options for Watson Speech services add the following line before the--license_acceptance
entry:--param-file=/tmp/work/install-options.yml \
Validating the installation
Watson Speech services is installed when the apply-cr
command returns [SUCCESS]... The apply-cr command ran
successfully.
However, you can optionally run the cpd-cli
manage
get-cr-status
command if you want to confirm that the custom
resource status is Completed
:
cpd-cli manage get-cr-status \
--cpd_instance_ns=${PROJECT_CPD_INSTANCE} \
--components=watson_speech
What to do next
After you complete the installation and provision service instances, the Speech services are ready to use with the specified installation and configuration settings. For more information about the Speech to Text service, see the following documentation:
- For a brief introduction to the Watson Speech to Text service, see About Speech to Text.
- For an overview of the features that the service provides, see Service features.
- For a tutorial that introduces speech recognition and transcription, see Getting started with Speech to Text.
If you also installed the Watson Text to Speech service, see the following documentation for more information:
- For a brief introduction to the Watson Text to Speech service, see About Text to Speech.
- For an overview of the features that the service provides, see Service features.
- For a tutorial that introduces speech synthesis, see Getting started with Text to Speech.