DEV Community

Ilya Nevolin
Ilya Nevolin

Posted on

Speech-to-Text Discord bot written in Go

As part of my personal journey to learn Go, I've decided to rewrite one of my open source projects in GoLang.

The project is a standalone (offline) speech-to-text bot for Discord. Basically it transcribes everything you say in a voice channel. This is useful if you want to have custom voice commands (eg. while gaming), or enhance the communication experience for hearing impaired/deaf people.

Repository: https://github.com/inevolin/DiscordEarsGo

The project makes use of the Vosk library, which does not work well on Mac OS (M1), so by default it is designed to only work on Linux x86 systems (since you would likely be hosting it on Linux). But the great thing is that Vosk works offline, open source and comes with a ton of models and languages (english, german, french, chinese, ...) for download https://alphacephei.com/vosk/models

One of the annoying things was also to decode Opus packets to PCM, it requires opus libraries to be installed. The same is true for the NodeJS version (which now requires ffmpeg to be installed). It would be nice if there was a tiny library/snippet that does this (not external library).

Enjoy!

Top comments (1)

Collapse
 
sloan profile image
Sloan the DEV Moderator

Hi there, we encourage authors to share their entire posts here on DEV, rather than mostly pointing to an external link. Doing so helps ensure that readers don’t have to jump around to too many different pages, and it helps focus the conversation right here in the comments section.

If you choose to do so, you also have the option to add a canonical URL directly to your post.