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
답변함 일 년 전
  • 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
답변함 일 년 전
  • Yes, I've followed the Lambda path, breaking the password in different variables with the edited value for each character. Thanks for the help.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠