Use the ADK to configure voice features for your agents.
Note: To use voice in watsonx Orchestrate Developer Edition, enable the voice feature by adding the --with-voice flag to the orchestrate server start command. For more information, see Installing watsonx Orchestrate Developer Edition: watsonx Orchestrate server.

Importing voice configuration

To import a voice configuration, first create a YAML file that defines your voice settings. This file includes the voice name, speech-to-text and text-to-speech provider settings, the primary language, and optional configurations for additional languages.
YAML
name: sample_voice_config
speech_to_text:
  provider: watson_stt
  watson_stt_config: 
    api_url: "example-stt.url"
    api_key: "example stt key"
    model: "example model"
text_to_speech:
  provider: watson_tts
  watson_tts_config: 
    api_url: "example-tts.url"
    api_key: "example tts key"
    voice: "example voice"
language: "en-US"
additional_languages:
  es:
    text_to_speech:
      provider: watson_tts
      watson_tts_config: 
        api_url: "example-tts.url"
        api_key: "example tts key"
        voice: "example voice"
    speech_to_text:
      provider: watson_stt
      watson_stt_config: 
        api_url: "example-stt.url"
        api_key: "example stt key"
        model: "example model"
After creating the file, import it using the following command:
BASH
orchestrate voice-configs import -f <path-to-your-voice-file>

Updating voice configuration

To update an existing voice configuration, import a new YAML file using the same command you used for the initial import:
BASH
orchestrate voice-configs import -f <path-to-your-voice-file>
Make sure the name field in your YAML file matches the name of the voice configuration you want to update. The ADK replaces the existing configuration with the new one.

Removing voice configuration

To remove a voice configuration:
BASH
orchestrate voice-configs remove

Listing voice configuration

To list all available voice configurations:
BASH
orchestrate voice-configs list