- Newest
- Most votes
- Most comments
The issue you're experiencing with AWS Polly generated MP3 files not playing fully on your mobile devices is likely related to the way Amazon Polly handles long audio files. For longer texts, Polly uses asynchronous synthesis, which can result in audio files that some standard MP3 players might have difficulty processing completely.
To solve this issue, you have a few options:
-
Use the Amazon Polly console or AWS CLI to create your audio files. When using these methods, Polly will automatically handle longer texts and produce a single, complete MP3 file that should work with standard MP3 readers.
-
If you're using a custom application or script to generate the audio files, make sure you're using the
StartSpeechSynthesisTask
API for longer texts. This API is designed to handle larger amounts of text and will produce a single, complete audio file. -
Check the size of your input text. If it exceeds Polly's synchronous synthesis limit (usually around 3000 characters), you'll need to use the asynchronous method mentioned above.
-
Ensure you're downloading the complete file. When using asynchronous synthesis, the output is stored in an Amazon S3 bucket. Make sure you're retrieving the entire file from S3 before transferring it to your mobile device.
-
Try using a different MP3 player on your mobile device. Some players may be better equipped to handle larger or more complex MP3 files.
-
If you're comfortable with audio editing, you could use a tool to combine multiple shorter audio segments into a single, continuous MP3 file.
By following these suggestions, you should be able to generate and play complete audio files from your .docx and .pdf documents using Amazon Polly, allowing you to listen to them in full while running.
Sources
Creating long audio files - Amazon Polly
Synthesizing speech with Amazon Polly example - Amazon Polly
Relevant content
- asked a year ago
- asked 3 years ago
- asked 4 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 10 months ago
What a prompt answer.... Thank you so much!