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

137 Views Asked by At

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:

  • Easy to understand "please send a postal letter to"

Then

  • Hard to understand address (with letters and numbers in UK postcode, like "XX12 1XX", and an ambiguously sounding street name)

Then

  • Easy to understand "and please ... enquiry ..."

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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