foxtrot

foxtrot started as a personal alternative to other Discord applications that use a bot user to play audio in voice channels. It was originally called "glowing memory," but was rebranded twice between 2022–2023. The bot was designed to be free for everyone, which is why it is also open source.

foxtrot is written in TypeScript and C++.

Complexity

Here are some reasons why this project is complex.

Lack of a Voice Helper

The library I used, Detritus.js, is quite barebones when it comes to voice. It can encode PCM samples to Opus (if specified), create packets, and send them through the Discord voice server connection. However, it lacks higher-level helpers to play audio for you (see discord.js/voice).

Surprisingly, this limitation actually helped the development of the bot, as it allowed me to implement real-time audio alterations, which was on of my goals.

Audio Mixer

The audio mixer is used for mixing short audio clips with either silence or the currently playing audio. Two or more versions were made, and the current one is written in C++, as it is much faster than a JavaScript-based mixer.

Branding

The project initially featured a robot as its mascot ("glowing memory"). It was rebranded to catvox in 2022, but later in the same year, I chose foxtrot as the final name and adopted a fox as the icon.

Abstract vector image showing the foxtrot logo in the center