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 Antworten
0
Akzeptierte Antwort

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
beantwortet vor einem Jahr
  • 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
beantwortet vor einem Jahr
  • Yes, I've followed the Lambda path, breaking the password in different variables with the edited value for each character. Thanks for the help.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen