Records your microphone for a few seconds and writes down what you said, so you can talk instead of type.
Copy this line into PowerShell, press Enter, and follow what it says (it even helps you pick your microphone):
powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/humbleangel/opencode-tool-hear/main/install-windows.ps1 | iex"(Keep reading below only if you prefer to install by hand.)
-
Python — download it from python.org. On Windows, tick the box "Add python.exe to PATH" during installation.
-
ffmpeg — download it from ffmpeg.org. It does the recording.
-
One small library — open a terminal and run:
pip install faster-whisper
The first run downloads a speech-recognition model (about 150 MB), once — it takes a few minutes, then it's instant forever.
-
Tell it which microphone is yours (Windows, one time):
- Run:
ffmpeg -list_devices true -f dshow -i dummy - Find your microphone's name in the list it prints.
- Run:
setx HEAR_MIC "paste the microphone name here" - Close the terminal and open it again.
- Run:
- Copy these 3 files into your OpenCode tools folder:
hear.py,hear.ts,hear.json- Windows:
C:\Users\YOUR-NAME\.config\opencode\tools\ - Mac/Linux:
~/.config/opencode/tools/
- Restart OpenCode.
Say or type: "listen for 10 seconds" — any number of seconds works. Then just talk. The agent writes down what it heard and answers you.
- "I don't know which microphone to use" → do step 4 above (
HEAR_MIC). - Recording failed → another app may be using the mic (Zoom, Teams…). Close it and try again.
- It wrote down the wrong language → tell it your language, e.g. "listen for 10 seconds, I speak Spanish".
MIT — free for everyone, see LICENSE.