This guide installs whisper.cpp on Ubuntu and sets up an English push-to-talk toggle:
- Press hotkey once → start recording
- Press hotkey again → stop → transcribe → paste at cursor
It’s written to work for most Ubuntu machines. GPU is optional.
This guide installs whisper.cpp on Ubuntu and sets up an English push-to-talk toggle:
It’s written to work for most Ubuntu machines. GPU is optional.
| module Dungeon | |
| # Multipliers for transforming coordinates into other octants | |
| MULT = [ | |
| [1, 0, 0, -1, -1, 0, 0, 1], | |
| [0, 1, -1, 0, 0, -1, 1, 0], | |
| [0, 1, 1, 0, 0, -1, -1, 0], | |
| [1, 0, 0, 1, -1, 0, 0, -1], | |
| ] | |
| # Determines which co-ordinates on a 2D grid are visible |
| # Sample from: | |
| # https://docs.dragonruby.org/#/samples/rendering-basics?id=labels-text-wrapping-mainrb | |
| def tick(args) | |
| lines = ["line1", "line2", "line3", "line4"] | |
| labels = lines.map.with_index do |text, index| | |
| { | |
| x: 1280 / 2, | |
| y: 720 / 2, | |
| text: text, | |
| anchor_y: index |
| #!/bin/bash | |
| # Whisper Push-to-Talk Dictation Tool | |
| # Runs whisper.cpp continuously, only processes output when key is held | |
| set -euo pipefail | |
| # Get script directory | |
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
| class Game | |
| attr_gtk | |
| def initialize | |
| # rng is sent to Random so that everyone gets the same levels | |
| @rng = Random.new 100 | |
| @solved_board = (1..16).to_a | |
| # rendering size of the cell |
| class Game | |
| attr_gtk | |
| def initialize | |
| @player = { x: 30, | |
| y: -16, | |
| w: 32, | |
| h: 32, | |
| dx: 0, | |
| dy: 0, |
This script transcribes audio into text using either a remote Groq API or a local Whisper.cpp model based on user input. Triggered via keybindings, it supports multiple languages.
whpr → Recognize audio in English.whpr fr → Recognize audio in French.whpr es → Recognize audio in Spanish.whpr lang → Recognize audio in any supported language.| class Game | |
| attr_gtk | |
| attr :enemy | |
| def tick | |
| defaults | |
| calc | |
| render | |
| end |