Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiscordCallWatch

Starts the Wispr Flow notetaker when a Discord call begins, and stops it when the call ends.

Call detected prompt Call ended prompt

Wispr Flow's notetaker can auto-detect meetings in Zoom, Teams, Webex, Slack and browser-based meeting sites, but not in Discord. If that is where your calls happen, you end up starting the notetaker by hand, usually late or not at all, and then forgetting to stop it afterwards. This script does both for you.

Behavior

  • Call detection. Discord only opens the microphone while you're connected to a voice channel or a DM / group call, so the script treats "Discord holds the mic" as "in a call". It polls the Windows audio capture sessions (the same information behind the taskbar microphone icon) every 3 seconds and needs two hits in a row.
  • Call start. A small dark prompt appears bottom-right on your primary monitor: Discord call detected. Starting the Wispr Flow notetaker in 20 s…, with Start notetaker now and Not this call. When the countdown ends it presses Wispr Flow's own Open meeting recorder shortcut, read from Wispr's config.json so it follows whatever you set there (Win+Alt+M by default). Wispr opens its Meeting Recorder and starts listening.
  • Call end. If the notetaker is still listening when Discord releases the mic, a second prompt counts down: Discord call ended. Stopping the Wispr Flow notetaker in 15 s…, with Stop now and Keep listening. Then it clicks the recorder's own Stop button for you, through Windows UI Automation. Wispr wraps up the meeting exactly as if you had clicked it.
  • Stays out of the way. No prompt when the notetaker is already listening (you started it yourself), when Wispr Flow isn't running (a short note instead), or while paused. A prompt disappears on its own when it no longer applies: the call ends during the start countdown, the call comes back during the stop countdown (Discord reconnecting), or you start or stop the notetaker by hand. Prompts never steal focus.
  • Reminder-only modes. Set AutoStartSeconds or AutoStopSeconds to 0, or use the tray toggles, and the prompts just remind you instead of acting.
  • Tray menu: toggle auto-start and auto-stop, pause, show either prompt as a demo, open the log, edit, reload, exit.

Requirements

  • Windows 10 or 11
  • AutoHotkey v1.1
  • Wispr Flow for Windows with the notetaker, and its Open meeting recorder shortcut enabled
  • The Discord desktop app (the script looks for Discord.exe; Discord in a browser is not detected)

Usage

Run DiscordCallWatch.ahk. Right-click the tray icon and pick Show start prompt (demo) to see what it looks like. To start it with Windows, put a shortcut to the script in your Startup folder (Win+R, shell:startup).

Settings are at the top of the script: PollMs, ConfirmPolls, AutoStartSeconds, AutoStopSeconds, StopButtonName, FinishingButtonName, PlaySoundOnPrompt. The two button names are the accessible names of the recorder's buttons in English (Stop listening, Finishing up…); if you run Wispr Flow in another language, put its labels there.

Command line

Switch What it does
--status Prints whether Discord holds the mic, the notetaker state, and the shortcut it would press.
--demo / --demo stop Shows the start or the stop prompt without a call. The buttons only log.
--test-hotkey Presses the Wispr shortcut once. This starts a real recording.
--test-stop Clicks the recorder's Stop button once, if it is listening.

Only the plain watcher mode replaces an already running copy; the switches run alongside it and exit on their own.

The log, DiscordCallWatch.log next to the script, records state changes only: call started or ended, what was pressed or clicked, and why a prompt closed.

How it works

In-call signal. Through Core Audio (IMMDeviceEnumerator → IAudioSessionManager2) the script lists the audio sessions on every active capture device and checks whether any session in the active state belongs to a Discord.exe process. Discord starts capturing when you connect to voice and stops when you leave, whether that is a server channel, a DM or a group call. Wispr Flow itself holds the mic permanently, so it can't be used as a signal. The microphone-usage history in the Windows registry works too, but goes stale if Discord crashes mid-call.

Starting. Wispr's Open meeting recorder shortcut is one of its auto-start sources, so a synthetic press of it opens the recorder and starts listening. The key codes are read from shortcuts in Wispr's config.json, re-read every 10 minutes, with Win+Alt+M as the fallback.

Stopping. Wispr Flow has no shortcut or deep link that ends a meeting (pressing the shortcut again only asks whether to switch meetings), so the script clicks the button. The recorder is an Electron window that exposes its controls through UI Automation. The script asks the window for the descendant named Stop listening and invokes it. The same lookup gives the notetaker state: Stop listening present means listening, Finishing up… means Wispr is wrapping up, and anything else means idle. That matters because the recorder window stays open after a meeting ends, so "window open" alone says nothing.

Wispr Flow does have its own auto-end, but for Discord it relies on silence and similar heuristics rather than on the call itself, and in practice it left my meetings running. The script ends the meeting seconds after the call.

Limitations

  • Desktop Discord only. Discord in a browser shows up as the browser process.
  • The button names are language-specific, see the settings.
  • If Wispr Flow adds Discord to its own auto-detect, or turns the shortcut into a toggle, this script becomes redundant or needs adjusting.
  • When you close the recorder window Wispr hides it rather than destroying it; a hidden window exposes nothing, so it counts as closed.

License

MIT

About

Starts the Wispr Flow notetaker when a Discord call begins and stops it when the call ends (AutoHotkey)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages