actions-on-googlevoiceactions-buildervui

Google Assistant custom action programming - speak few words of a constant prompt speech slower


I am building a custom action for Google Assistant on the web view of https://console.actions.google.com/

One of the responses is a long prompt sentence consisting of something like:

Then

Then

It's all defined in the yaml of the welcome prompt of the given scene:

    candidates:
      - first_simple:
        variants:
          - speech: |-
              Please ... where the address is ... ... and please ... enquiry ...

Is there a way to fine tune this "speech"? Or is there an alternative to make Google assistant say this constant text with a slower pace in the middle part?


Solution

  • Yes, you can use SSML to send back the reply instead of text, which is converted using a simpler text-to-speech model.

    This SSML can include a prosody tag with a rate attribute for part of what you send so it speaks that part slower.

    So it might look something like

        candidates:
          - first_simple:
            variants:
              - speech: |-
                  <speak>Please ... where the address is <prosody rate="30%"> ... ...</prosody> and please ... enquiry ...</speak>
    

    You may also wish to look at the say-as tag to spell out the characters in the address. That specific part in SSML might look something like

       <say-as interpret-as="characters">XX12 1XX</say-as> somewhere street