jcberquist/aws-cfml

How to pass in SSML on Polly

Closed this issue · 3 comments

I am trying to run this:

form.inString = "<speak><prosody pitch='medium' rate='medium'>Ginelle, Middens</prosody></speak>"
form.voice = "Joanna"

 response = variables.aws.polly.synthesizeSpeech(
          text = form.inString.replacelist("'", '"', "all"), 
          voiceid = form.voice,
          textType = "ssml", 
          )

What I get in response is as if the SSML (XML) tags were not even there.

It is responding as if it were

speak prosody pitch medium rate medium Ginelle, Middens prosody speak

I have tried encodeForXML and canonicalize.

I wonder what it needs

Interesting, I am not able to reproduce this. Can I ask what version of CF you are using? I tried your example using both Adobe CF 2018 and Lucee, and in both cases it seemed to work fine.

ColdFusion 2021 on Windows

2021,0,02,328618

I am going to try some more stuff on it. Let me see if I can find more info.

I had file cacheing turn on. It works as is.