Skip to content

Conversation

@ppeiris
Copy link

@ppeiris ppeiris commented Mar 21, 2025

Code has been updated to make sure the api does not failed

Issue #, if available:

When the audio transcribe results are more than 5000 bytes, the detect_sentiment API call fails due to its input limitations
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/comprehend/client/detect_sentiment.html

Description of changes:
Check the input text size to make sure it's within the 5000 bytes limit, and if it exists, then truncate it to use the first 5000 bytes.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Code has been updated to make sure the api does not failed
@rstrahan
Copy link
Contributor

rstrahan commented Jul 2, 2025

Thank you @ppeiris ! Merging now, and sorry for the delay.

@rstrahan rstrahan merged commit 54838b2 into aws-samples:develop Jul 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants