0

I have a problem how to use in Twilio prosody and interpretAs code combined. As 2 speparate tags this works but encapsulation don't. Do you have any ideas how to do this slow peace and interpret as ?

SsmlSayAs sayContactPhone = new SsmlSayAs.Builder("+4421222222").interpretAs(SsmlSayAs.InterpretAs.TELEPHONE).build();

SsmlProsody sayContactPhoneProsody  = new SsmlProsody.Builder("+4421222222").pitch("-10%").rate("85%").volume("-6dB").build();

Any help appreciated

Mirek
  • 1
  • 1
  • It looks to me as though the Twilio helper library doesn't allow you to nest within prosody, but the spec disagrees with that. I will check internally at Twilio to see whether this is intentional or if there is anything that can be done. – philnash Nov 14 '18 at 04:48

1 Answers1

0

Twilio developer evangelist here.

Currently the Twilio Java helper library does not support nesting within SSML elements. I have raised this internally and I will let you know when support has been added.

philnash
  • 70,667
  • 10
  • 60
  • 88
  • Thanks a lot. I've solved problem by manually manipulate SSML xml. This works perfectly but then helper is useless. I know that some of the tags can't be nested. – Mirek Nov 15 '18 at 12:10
  • I agree and that's why we are working to fix this in the helper library. Sorry you've had to manually write it for now. – philnash Nov 15 '18 at 12:15
  • 1
    This is now live in 8.22.1: https://github.com/twilio/twilio-java/releases/tag/8.22.1 – Borja Canseco Nov 18 '21 at 17:26