Disscribe is a discord bot for transcribing voice messages using OpenAI's Whisper model. It uses multiprocessing to transscribe multiple messages at the same time, thus allowing for high efficiency. It also allows a user to opt in/out of transcribing messages using a single command
To get started, simply run disscribe and the program will guide you to setup a config in your current directory.
Note the default configfile localtion is ./data.json, but you can change where disscribe should try to find it's configfile using DISSCRIBE_CONFIG. It should point to a valid json file.
Note that right now disscribe does not yet register it's /toggle command with discord. This will be added in the future. A temporary fix would be to run the old branch once, but I do not recommend it (or please do it in a temporary venv).
Click here to add the instance of disscribe ran by Vosjedev to your discord server. Note there is zero guarantee of the instance being up at any moment, neither is there a guarantee of the instance staying up, or being fast.
I DO NOT store any messages on the server for longer than is needed to transcribe it. As you can see in the source, the bot removes the message immediately after transcription.
Any instances except for the one linked above are outside of my control. Only use instances you trust with your messages. I am not responsible for anything that happens outside of my instance (discord user id 1383532980886175854).
Disscribe has been fully rewritten to use my own discord library instead of discord.py. The following improvements have been made:
- instead of uploading the whole text at once, it uploads segments as soon as it has them
- this results in faster but partial transcriptions while working. unfinished messages are suffixed with "[…]"
- more precise info:
- it lets you know what stage it's in (downloading, queue, processing, transcribing)
- the queue shows what queue position your message is in (theoretically - it's hard to test)
- less dependencies
- discord.py had a lot of dependencies. my library only has 2
- openAI whisper had a lot of (CUDA) dependencies. pywhispercpp doesn't.
- speed improvement
- whisper.cpp is a lot faster than openAI whisper
- note that whisper.cpp is already being used in the latest commit of
main.
All the old features are still here too.
I doubt anyone needs this section. Anyways, here's what to do when migrating:
- move the
"token" config value to an environment variable DISCORD_TOKEN
- convert all user ids in the config to strings, eg by running this in a python interpreter in the same directory as your data.json:
import json
with open("data.json","r+") as fd:
data=json.load(fd)
data["optout"]=[ str(uid) for uid in data["optout"] ]
fd.seek(0)
fd.truncate()
json.dump(data, fd)
- Note I recommend regenerating your venv to get rid of unneeded dependencies.