Add Whisper transcription for BossmanJack Discord voice messages (#107)

* Add Whisper transcription for BossmanJack Discord voice messages

Detect Discord voice message attachments (audio with IS_VOICE_MESSAGE flag)
from the monitored user and transcribe them via OpenAI Whisper API before
relaying to chat. Reuses the existing OpenAi.ApiKey setting. Feature is
disabled by default via Whisper.Enabled setting.

* Use separate API key setting for Whisper transcription

* Switch to local Whisper and post-then-edit transcription flow

Voice messages are now relayed immediately with a "transcribing..." placeholder,
then transcribed locally via the whisper CLI and the message is edited to append
the result. Removes OpenAI API dependency in favor of a local whisper binary.

Settings: Whisper.BinaryPath, Whisper.Model, Whisper.Enabled

---------

Co-authored-by: DFE <dfe@dfe.com>
Co-authored-by: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com>
This commit is contained in:
IfYouComplainImDFEingAgain
2026-04-16 22:14:58 -04:00
committed by GitHub
parent 1a49fe1976
commit 3d269716e8
3 changed files with 212 additions and 3 deletions

View File

@@ -574,6 +574,12 @@ public static class BuiltIn
public static string KasinoKrashEnabled = "Kasino.Krash.Enabled";
[BuiltInSetting("Delay in milliseconds before cleaning up krash", SettingValueType.Text, "10000", WholeNumberRegex)]
public static string KasinoKrashCleanupDelay = "Kasino.Krash.CleanupDelay";
[BuiltInSetting("Whether Whisper transcription is enabled", SettingValueType.Boolean, "false", BooleanRegex)]
public static string WhisperEnabled = "Whisper.Enabled";
[BuiltInSetting("Path of the Whisper binary", SettingValueType.Text, "whisper")]
public static string WhisperBinaryPath = "Whisper.BinaryPath";
[BuiltInSetting("Whisper model name (e.g. tiny, base, small, medium, large)", SettingValueType.Text, "base")]
public static string WhisperModel = "Whisper.Model";
[BuiltInSetting("Whether Winna is enabled", SettingValueType.Boolean, "false", BooleanRegex)]
public static string WinnaEnabled = "Winna.Enabled";
[BuiltInSetting("BossmanJack's Winna username", SettingValueType.Text, "ImBossmanJack")]