Cross-platform voice and clap-controlled app launcher! Say a wake word, then use clap patterns to launch apps.
โ Automatically detects your OS (macOS, Windows, Linux) and adjusts commands accordingly!
- Say wake word (e.g., "jarvis") โ Activates system
- Double clap ๐๐ โ Launches your configured apps
- Triple clap ๐๐๐ (within 30 seconds) โ Opens a video/URL
- ๐ฅ๏ธ Cross-platform: Works on macOS, Windows, and Linux
- ๐ 100% Offline: Wake word detection runs locally
- ๐ฏ Smart OS Detection: Automatically uses the right commands for your system
- ๐ค Fast & Accurate: Porcupine wake word engine
- ๐ต Customizable: Configure any apps and actions
- Python 3.9-3.12 (avoid 3.13 on Windows - dependency issues)
- Microphone
- macOS, Windows, or Linux
- Free Porcupine API key from console.picovoice.ai
Sign up at console.picovoice.ai and copy your Access Key (free tier available).
macOS:
# Install portaudio first (required for PyAudio)
brew install portaudio
git clone https://github.com/tpateeq/wake-up.git
cd wake-up
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtWindows:
git clone https://github.com/tpateeq/wake-up.git
cd wake-up
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txtLinux:
# Install portaudio first (required for PyAudio)
sudo apt-get install portaudio19-dev # Ubuntu/Debian
# OR
sudo dnf install portaudio-devel # Fedora
git clone https://github.com/tpateeq/wake-up.git
cd wake-up
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtOpen clap_launcher.py and add your key at line 32:
PORCUPINE_ACCESS_KEY = "your-key-here"The script automatically detects your OS and uses the appropriate commands! Just customize the app names in the launch_all_apps() method (starting at line 267):
Example configuration:
def launch_all_apps(self):
print("\n๐ DOUBLE CLAP DETECTED! Launching apps...\n")
if self.os_type == "Darwin": # macOS
self._launch_app_macos("Visual Studio Code")
self._launch_app_macos("Google Chrome", args=["--new-window", "https://claude.ai"])
self._launch_app_macos("Discord")
elif self.os_type == "Windows":
self._launch_app_windows("code") # VS Code
self._launch_app_windows("chrome", args=["https://claude.ai"])
self._launch_app_windows("discord")
elif self.os_type == "Linux":
self._launch_app_linux("code") # VS Code
self._launch_app_linux("google-chrome", args=["https://claude.ai"])
self._launch_app_linux("discord")Customize for your favorite apps:
macOS examples:
self._launch_app_macos("Spotify")
self._launch_app_macos("Slack")
self._launch_app_macos("Safari", args=["https://example.com"])
self._launch_app_macos("Terminal")Windows examples:
self._launch_app_windows("spotify")
self._launch_app_windows("slack")
self._launch_app_windows("notepad")
# Full path for apps not in PATH:
subprocess.Popen([r"C:\Program Files\App\app.exe"])Linux examples:
self._launch_app_linux("spotify")
self._launch_app_linux("slack")
self._launch_app_linux("firefox", args=["https://example.com"])
self._launch_app_linux("gnome-terminal")python3 clap_launcher.py # macOS/Linux
python clap_launcher.py # WindowsSay "jarvis" and start clapping! ๐
The script will automatically detect your OS:
๐ฅ๏ธ Detected OS: Windows # or Darwin (macOS), or Linux
jarvis(default)computeralexahey googlehey siriok googleterminatorbumblebeeporcupineblueberrygrapefruitgrasshopper
Use a different wake word:
python3 clap_launcher.py --wake computerEdit the play_youtube_video() method around line 333:
def play_youtube_video(self):
youtube_url = "https://www.instagram.com/p/DMZ58Whvfir/" # Change to any URL!
# The script automatically handles opening URLs on all platformsYou can use any URL - YouTube, Instagram, websites, local files, etc!
If claps aren't being detected or too many false positives:
# In main() function, around line 416:
launcher = UnifiedLauncher(
wake_word=wake_word,
clap_threshold=1800, # Lower = more sensitive, Higher = less sensitive
debug=debug_mode
)Run with debug mode to see amplitude levels and find the right threshold:
python3 clap_launcher.py --debugCheck microphone permissions:
- macOS: System Preferences โ Security & Privacy โ Microphone โ Enable Terminal
- Windows: Settings โ Privacy โ Microphone โ Enable Python
- Linux: Check microphone permissions for your terminal
Test your microphone:
- Speak clearly at normal volume
- Make sure you're using the correct microphone (if you have multiple)
- Try a different wake word:
python3 clap_launcher.py --wake computer
Check which microphone is being used: Run this Python snippet to list available audio devices:
import pyaudio
pa = pyaudio.PyAudio()
for i in range(pa.get_device_count()):
info = pa.get_device_info_by_index(i)
if info['maxInputChannels'] > 0:
print(f"{i}: {info['name']}")- Run debug mode:
python3 clap_launcher.py --debug - Clap sharply and crisply near the microphone
- Watch the amplitude output - it should spike above the threshold
- Adjust
clap_thresholdin code (line 416)- Lower value = more sensitive (might pick up background noise)
- Higher value = less sensitive (might miss soft claps)
- Default threshold is 1800 - adjust based on your debug output
Example debug output:
Amplitude: 2500 (threshold: 1800) # โ
Clap detected!
Amplitude: 1200 (threshold: 1800) # โ Too quiet
pip install pvporcupineThis means portaudio wasn't installed before PyAudio:
# Install portaudio
brew install portaudio
# Then reinstall requirements
pip install -r requirements.txtRecommended solution: Use Python 3.11 or 3.12 instead.
Some dependencies (numpy, PyAudio) don't have pre-built wheels for Python 3.13 on Windows yet.
- Download Python 3.12 from python.org
- Reinstall and create new venv:
py -3.12 -m venv venv venv\Scripts\activate pip install -r requirements.txt
Check if apps are installed and in PATH:
where appname # Check if app is in PATHFor apps not in PATH: Use full path in the script:
subprocess.Popen([r"C:\Program Files\YourApp\app.exe"])Common app commands:
- VS Code:
code - Chrome:
chrome - Discord:
discord - Spotify:
spotify - Slack:
slack
"Invalid access key" or initialization failed:
- Make sure you copied the key correctly (no extra spaces)
- Verify the key at console.picovoice.ai
- Check if you're using a v3 key with v4 library (or vice versa)
- Free tier keys have device limits - you may need a new key if using on multiple devices
# Ubuntu/Debian
sudo apt-get install portaudio19-dev python3-dev
# Fedora
sudo dnf install portaudio-devel python3-devel
# Then reinstall
pip install -r requirements.txt- OS Detection: Script detects your platform using
platform.system() - Wake Word: Porcupine continuously listens for your wake word (offline)
- Activation Window: 5 seconds to perform double clap
- App Launch: OS-appropriate commands launch your apps
- Triple Clap Window: 30 seconds to perform triple clap for secondary action
- Wake word detection runs 100% offline on your machine
- No audio data is sent to any server
- Porcupine API key only validates the library, doesn't transmit audio
- Completely private and secure
Contributions welcome! Feel free to:
- Add support for more platforms
- Improve clap detection algorithm
- Add more customization options
- Fix bugs or improve documentation
MIT License - feel free to use and modify!
โญ Star this repo if you find it useful!
Made with ๐ for productivity enthusiasts