Portfolio Project 10: HTTP Requests and APIs

For Day 91 of the 100 Days of Code course, the project was to create a program that converts PDF documents into an audio file of the text or an audio book.

audio playback button

The end goal of the project was to create an audio file from text on a PDF file.

This project could further be broken down into two sub goals.

  • Save the text from a PDF file to a variable.
  • Use an API service to convert that text into an audio file.

This project was a bit different from others that were worked on since to ultimately get the program working, I did end up having to sign up for a paid service. Fortunately, for my purposes, AWS did have a free tier.


This project was a bit easier than other ones that I had to work on for this course. However, it did require doing research into what service to use for converting text to an audio file.

Most of the services that provided this capability were paid services such as AWS, Google Cloud, and a few others. During my research, a user posted about a free service in the courses Q&A section.

This free resource named api.voicerss.org, was easy to work with and did not require credit card information to use their API.

screenshot of voicerss version

However, the API was limited when it came to working with text documents that were larger than a certain length. If the text that was uploaded to the website was to long, it would return an HTTPError. This was tested with multiple text documents to verify that it was not just a single document or characters causing this issue.

Completing this project with this limitation would have satisfied the requirements for the project, however, it did feel to easy and a bit incomplete.

I ended up using AWS Polly and an S3 bucket to complete an alternate version of this project. Using AWS Polly, I did not run into any issues with multipage documents and the audio was able to be saved to an S3 bucket successfully and be played without any issues. Additionally, the quality of the text was better using AWS. Although there was hesitancy to use AWS due to potentially having to pay for the service, I was able to complete the project working with their free tier.

code using aws api
screenshot of files saved in s3 bucket

This project was not as challenging as others however it did require a good amount of research to complete it. Additionally, it was fun completing two separate versions of this project.