Polly - Password speech

0

Hey guys, I have an automation which is retrieving an auto generated password from client end using lambda. After that, we are using Amazon Connect to transmit the password to the costumer. However, as password it is case-sensitive, I didn't find a way to use the Polly (integrated with Connect) in the available SSMLs to IA to say the upper and lower cases of the password.

There is any alternative solution for this?

2 回答
0
已接受的回答

Speaking only about Amazon Polly you could create a lexicon

<?xml version="1.0" encoding="UTF-8"?>
<lexicon version="1.0"
      xmlns="http://www.w3.org/2005/01/pronunciation-lexicon"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.w3.org/2005/01/pronunciation-lexicon
        http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd"
      alphabet="ipa" xml:lang="en-US">
  <lexeme>
    <grapheme>A</grapheme>
    <alias>capital A</alias>
    <grapheme>B</grapheme>
    <alias>capital B</alias>
    <grapheme>C</grapheme>
    <alias>capital C</alias>
    <!-- Add more letters as needed -->
  </lexeme>
</lexicon>

and use the lexicon only for the request that spells out the case - sensitive text, for example with AWS SDK:

aws polly synthesize-speech --voice <VoiceId> --text-type ssml --text '<speak>A, B, c</speak>' --lexicon-names 'capitals'  --output-format mp3 --region us-east-1  ./out.mp3

I don't know if Amazon Connect allows for using lexicons. If not, you can embed the pronunciation directly in SSML:

aws polly synthesize-speech --voice <VoiceId> --text-type ssml --text '<speak><sub alias="Capital A">A</sub>, <sub alias="Capital B">B</sub>, c</speak>' --output-format mp3 --region us-east-1  ./out.mp3
AWS
已回答 1 年前
  • Thanks so much.

    It may not be very applicable for what I'm doing. So I've followed a different path, doing it directly in the Lambda code, to break the password in different variables and renaming, as you did. Hence, Amazon Connect just needs to read back the variable's value.

0

Doesn't look like Polly supports the interpret-as the same way other vendors do it. I see two options: Change the password generator to not include capital letters. Create a Lambda which takes the password, generates a custom prompt "P4ss" like "Upper case P, the number four, lower case s, lower case s.". Actually neither one of these are very good, can you SMS the password to the caller? Ultimately, that might be the better option. Or maybe email it to their backup email in case they have lost access to their primary email.

david

profile picture
dmacias
已回答 1 年前
  • Yes, I've followed the Lambda path, breaking the password in different variables with the edited value for each character. Thanks for the help.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则