Skip to content

Instantly share code, notes, and snippets.

@LaptopDev
LaptopDev / ocr.py
Last active November 5, 2023 17:21
Tesseract OCR with Grim - also accepts CL image paths as arguments
# Tesseract OCR ; process images as arguments to convert image to text
## .bashrc:
# alias catpic='python3 $home/scripts/ocr.py'
## keybind that I use in my hyprland configuration file:
# bind = SUPER, o, exec, grim -g "$(slurp)" - | python3 $home/scripts/ocr.py | wl-copy
@LaptopDev
LaptopDev / transcribe.sh
Last active August 31, 2023 14:50
linux transcribe.sh (bg script, hotkey adaptable) for whisper.cpp - Backup voice memo and transcription, and copy transcription to clipboard
#!/bin/bash
# place in whisper.cpp/
# assign this scfript to a hotkey to start a recording
# assign ffmpeg kill command to another hotkey to stop it
# if desired,
# modify the whisper.cpp/main command to add an argument
# for using a specific model other than whisper.cpp's base model
cd /home/user/whisper.cpp