Inspiration

Our group was searching for a relatively simple yet useful application in Java. After a good amount of thinking, we decided to make a Discord bot.

What it does

"Discord Clip" is a Discord bot that records a Discord voice channel and outputs a wave audio file of the specified past few seconds along with a transcript created using the speech-to-text function of the AssemblyAI API.

Through the “/join” command, the bot joins the user’s current voice channel and immediately begins recording all audio. Via the “/clip” command, the bot then converts the recorded audio data in the format of byte arrays into a wave audio file (of specified length in seconds) and outputs it to a specified Discord text channel. Additionally, the bot then sends that wave audio file to the AssemblyAI API via an HTTP request, and receives an AI-generated speech-to-text transcript in return.

How we built it

The bot is coded using Java, and makes use of the Java Discord API (JDA), the AssemblyAI API (accessed using Java Http Components), as well as a Java library called Fastjson. Additionally, the bot is hosted via Heroku, a cloud application platform.

Frameworks Used: JDA - https://github.com/DV8FromTheWorld/JDA Fastjson - https://github.com/alibaba/fastjson Apache Http Components - https://hc.apache.org/

Challenges we ran into

Most of the challenges we ran into were related to implementing the various APIs used in our project. From the Java Discord API to the multiple HTTP-related APIs we used to work with the AssemblyAI website, each move forward also seemed to be a move backwards. However, through trial and error (and a lot of patience), we were able to overcome each challenge. In particular, the implementation of the AssemblyAI framework proved to be quite a challenge, due to the fact that we were rather unfamiliar with using JSON files, as well as the lack of documentation detailing the implementation of the API using Java. However, through extensive research (and generous help from mentors), we were able to overcome this issue.

Accomplishments that we're proud of

We have successfully implemented the AssemblyAI API with Java. Through numerous debugging, we have implemented the expected features with Discord APIs.

What we learned

We’ve gained practical experience in learning and working with various APIs to fulfill our goal. We also learned helpful skills in collaborating on software with other people, since we rarely see this type of collaboration in our programming classes.

What's next for Discord Clip

Currently we do not have a plan for the future of this project, but we hope to see the bot expand its capabilities and fulfill more roles in the future.

Built With

+ 1 more
Share this project:

Updates