0

I'm using this code as my main voice:

let SSMLText = `<speak>
        <voice gender="male" variant="3">
            <prosody rate="105%">Right away,</prosody>
        </voice>
        </speak>`

The problem is when you are asking a permission in context like:

  return conv.ask(new Permission({
        context: SSMLText
        permissions:
            ['DEVICE_PRECISE_LOCATION'],
    }));

The result is that is just says literally:

`<speak> <voice gender="male" variant="3"> <prosody rate="105%">Right away, </prosody> </voice> </speak>, I'll just need to get your current location from Google. Is that ok?` 

Is it possible to use SSML with permissions library, so I can change the voice? If I don't use SSML it just sounds like someone else is talking which ruins the experience.

WinterChilly
  • 1,549
  • 3
  • 21
  • 34

1 Answers1

1

There are other people who encountered this: https://github.com/actions-on-google/actions-on-google-nodejs/issues/204

As stated in the issue, there doesn't seem to be a way of using SSML for the context. Because tags need to wrap the entire response, otherwise it doesn't work.

You might wanna try sending multiple responses, one that explains the context with SSML and the other for Permission. And since you will have explained the context in the previous response, you can try using a short value for context.

The permission still wouldn't sound the same but the overall experience might be a little better.

Yüksel Tolun
  • 336
  • 1
  • 6