Lex Chatbot with Polly Audio Responses

0

I hope this message finds you well. I am currently facing a challenge in integrating Amazon Polly audio responses with my Lex chatbot. The objective is to provide users with both text and audio responses based on their interactions with the chatbot.

Problem 1: Polly Audio Integration with Lex Text I have successfully implemented a Lex chatbot with response generation using a Language Model (LLM). For audio generation, I have integrated Amazon Polly, which generates audio responses and saves them in an S3 bucket. However, I am struggling to seamlessly integrate Polly audio responses with the Lex text responses and display them in the Lex bot's UI.

Problem 2: Mic Input for Audio Question Additionally, when attempting to use the microphone option in Lex for asking questions in audio form, I encounter the following error:

Invalid Bot Configuration: Encountered an exception when making Amazon Polly service call, 1 validation error detected: Value null at 'voiceId' failed to satisfy constraint: Member must not be null (Service: AmazonPolly; Status Code: 400; Error Code: ValidationException; Request ID: 7a3064eb-9d7f-4497-896c-494049124d6a; Proxy: null)

I would greatly appreciate any guidance or insights from the community on resolving these issues. If anyone has successfully integrated Amazon Polly audio responses with Lex chatbots or has experience with the microphone input configuration, your assistance would be invaluable.

Thank you in advance for your help!

1개 답변
0

Have you specified the voice to be used (the voice id, for example Matthew)? The error message seems to be complaining about that. https://docs.aws.amazon.com/polly/latest/dg/API_Voice.html

profile pictureAWS
답변함 5달 전
  • polly_client = boto3.client('polly') import base64 voice_id = 'Joanna' def generate_audio_from_text(text): response = polly_client.synthesize_speech( Text=text, OutputFormat='mp3', VoiceId=voice_id ) I also add this , but error remain same

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

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

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

관련 콘텐츠