👍 Temporary Mute for Alfred

If you don’t already use it, Alfred (a.k.a. Alfred app) is a free application launcher and productivity application for macOS. It’s similar to Apple’s Spotlight feature built into all Macs, but it is significantly more powerful. To make a comparison, using Apple’s Spotlight is like watching a high school play in a rural town whereas using Alfred is like watching a multi-million dollar Broadway musical in New York City. The two are nearly incomparable.

This post is not about Alfred though. This post is about a workflow I created for Alfred.

Background

Several years back I got fed up with listening to commercials while watching baseball, basketball, or football games. Sure, I could mute the video player and switch to another window to do something else for a moment, but doing that often caused me to entirely forget about the game I was watching and miss significant portions of play. There had to be a better way.

This got me thinking about what the situation would be like in a perfect world. Well, in a perfect world the commercials would automatically mute when they started and unmute once they were finished playing. Unfortunately, I do not know how to build an audio/video artificial intelligence system that would analyze the incoming stream to determine if a commercial was playing. However, the idea of creating some kind of timer that would automatically unmute the audio on my computer after a set period of time seemed possible. This is what I ended up building.

The Workflow

My finished creation is a workflow for Alfred which I call ‘Temporary Mute’. This workflow allows a user to mute the volume on their computer for a specified duration of time. Once the duration of time has elapsed, the computer’s volume is automatically unmuted to its previous volume. The user can also manually unmute the volume at any time before the define duration is over.

The workflow has two modes which can be used:

Mute for: Using the “mute for” keyword phrase allows the computer to be muted for the exact number of seconds specified. Simply include a number after “mute for” and the volume will remain muted for that number of seconds. [Example: “mute for 145”]

Mute time: Using the “mute time” keyword phase allows the user to select from predefined periods of time for muting the computer. After typing “mute time”, select one of the predefined durations and the computer will be muted for that amount of time.

Limitations

While this workflow is incredibly useful, it is not perfect. As I already mentioned, it does not automatically recognize when commercials end. If you set a mute time that exceeds the duration of the commercial break, you’ll end up missing a few moments of the game when it comes back. Though, over time you will become familiar with the standard break lengths used in each sport. For example, baseball’s commercial breaks tend to be close to 90 seconds whereas basketball’s come in around 120 seconds and football’s can reach 180 seconds or longer.

Additionally, this workflow was built to be used with the default audio device on your Mac. If you use a DAC (digital-to-analog converter) or other external audio playback device, unfortunately this workflow will not function correctly.

Finally, this workflow obviously requires that you use Alfred. You can probably hack at it so that it functions elsewhere, but it won’t work like that out of the box.

Links

Temporary Mute [direct download link]
Temporary Mute [Pacmax]
Temporary Mute [GitHub]

Alfred 3 for Mac [website]

Scroll to Top