Converting Audio to Text Using AssemblyAI’s REST API


This application converts an audio clip to text using AssemblyAI’s REST API. I followed the tutorial from Coding With John on YouTube and learned a lot about calling an API. You can check out the tutorial video How To Call a REST API In Java – Converting Speech to Text with AssemblyAI. This application utilizes AssemblyAI, and they are credited in the code comments. You can sign up and get your own API key by going to their website https://AssemblyAI.com/

Below is a sample of audio that I made to test the application. Under that is a video of the application in action.

The audio I used to transcribe is me saying how I learned how to use a REST API
Here is the console window of the application being executed

If you would like to test the code yourself, you must have an API key.

This project only scratches the surface of what you could do with calling a REST API. I plan on browsing some more interesting APIs out there to code up some cool stuff. Making this project into a GUI would be the next step, where you can record and upload an audio byte. After that, it would take a few seconds to transcribe the audio on that sound clip. Finally, it would give you the transcribed text and display it back as well as give you a text file.

There are many applications to this such as subtitles on videos, and the API lets you get access to exactly when the words are mentioned with a timestamp. Doing this project was fun, and I hope to tweak it more in the future.

You can find the code posted on my GitHub page, go check it out!


No comments to show.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.