copyright: years: 2017, 2023 lastupdated: "2023-01-06"
Dynamically configuring Watson services
Rather than statically defining the Watson services, service orchestration engine, or third-party speech services, you can configure Watson Assistant to dynamically set the configuration based on interactions that happen during the call. For example, if Watson Assistant discovers that the caller prefers to speak Spanish, the service can pass parameters to the Speech to Text and Text to Speech services to change the language mid-call.
By using this approach, you can completely define the configuration for the Speech to Text and Text to Speech services from within Watson Assistant, so you have a single place to configure your Watson services.
Note that because only self-service agents use Watson Assistant, agent assistants can't use this configuration method.
Scenarios for dynamic configuration
With the ability to adapt to call conditions in real time, your Voice Gateway implementation can better respond to callers, such as in the following use cases:
- Change Watson service languages during a call based on caller language
- Change the Speech to Text language models for domain-specific modeling
- Configure credentials for the Speech to Text and Text to Speech services on the first turn of a call. For example, you can set which Speech to Text instance to connect to, or just sign in to the services with different credentials.
- Change to a different Watson Assistant workspace in the middle of a call
- Configure settings when using an MRCP server to connect to speech and text services.
Defining configuration in Watson Assistant
Any values that are applied within Watson Assistant overwrite the values that you define in the Voice Gateway configuration, but only for that particular call.
-
In your Watson Assistant dialog tree, define either a single action with the
vgwActiontag or, if changing the configuration is part of a sequence of actions, use thevgwActionSequencetag. For more information, see Defining actions and states. -
Within the action tag, define the action and configuration for the service that you want to configure. See the following pages for more information and examples:
- Dynamically configuring the Watson Assistant service or service orchestration engine
- Dynamically configuring the Speech to Text service or Speech to Text Adapter
- Dynamically configuring the Text to Speech service
For example, when the following single action is sent from the Watson Assistant dialog, the value is passed through Voice Gateway to the Speech to Text service and sets the language model to
es-ES_NarrowbandModel:{ "output": { "vgwAction": { "command": "vgwActSetSTTConfig", "parameters": { "config": { "model": "es-ES_NarrowbandModel" } } } } } -
When the node is triggered, the actions that are defined on the node are passed through Voice Gateway to the associated Watson service.
Note: Version 1.0.0.2 added action tags to the API, which you use to initiate actions in Voice Gateway. The state variables that were previously used to initiate actions in Voice Gateway, including configuring Watson speech services, are now deprecated.