Skip to content

Instantly share code, notes, and snippets.

@guynich
guynich / gist:69f67692c4298a8bb18e53b2b62d8236
Created February 11, 2026 17:40
moonshine-voice 0.0.48
$ cd && python3 -m venv venv_moonshine
$ source ~/venv_moonshine/bin/activate
# python3 -m pip install moonshine-voice
$ python3 moonshine_voice.mic_transcriber
/usr/local/Cellar/python@3.13/3.13.12/Frameworks/Python.framework/Versions/3.13/Resources/Python.app/Contents/MacOS/Python: can't open file '/Users/guynicholson/moonshine_voice.mic_transcriber': [Errno 2] No such file or directory
(venv_moonshine) MacBookPro:~ guynicholson$ python3 -m moonshine_voice.mic_transcriber
Traceback (most recent call last):
File "/Users/guynicholson/venv_moonshine/lib/python3.13/site-packages/moonshine_voice/moonshine_api.py", line 182, in _load_library
self._lib = ctypes.CDLL(str(lib_path))
~~~~~~~~~~~^^^^^^^^^^^^^^^
@guynich
guynich / gist:6ad694e8a83a0d0871c24505ae358101
Last active November 29, 2025 19:59
Intelligence per watt run (NVidia RTX A2000) using OpenAI API - scoring failed for 15 runs

OpenAI billed 1.12USD for this session.

$ ipw profile --client ollama --model llama3.2:1b --dataset ipw
2025-11-29T16:57:44.060304Z  INFO energy_monitor: Starting Energy Monitor
2025-11-29T16:57:44.060471Z  INFO energy_monitor: Configuration loaded: Config { port: 50053, bind_address: "127.0.0.1", collection_interval_ms: 50 }
2025-11-29T16:57:44.219886Z  INFO energy_monitor: System info: SystemInfo { os_name: "Ubuntu", os_version: "24.04", kernel_version: "6.14.0-35-generic", host_name: "Precision5820", cpu_count: 8, cpu_brand: "Unknown CPU" }
2025-11-29T16:57:44.287007Z  INFO energy_monitor: GPU info: GpuInfo { name: "NVIDIA RTX A2000 x1", vendor: "NVIDIA", device_id: 0, device_type: "GPU", backend: "NVML" }
2025-11-29T16:57:44.287030Z  INFO energy_monitor::server: Starting energy monitor gRPC server on 127.0.0.1:50053
Saving the dataset (1/1 shards): 100%|█████████████████████████████████████████████| 100/100 [00:00<00:00, 6002.07 examples/s]
Profiling:  20%|█████████████▉                        
@guynich
guynich / crisper_whisper_gigaset_test.py
Created January 4, 2025 07:00
nyrahealth/CrisperWhisper extract token timestamps
"""Example adapted from
https://huggingface.co/nyrahealth/CrisperWhisper#21-usage-with-%F0%9F%A4%97-transformers
Modified for OpenASR leaderboard Gigaspeech test dataset.
Run with fork of transformers.
https://github.com/nyrahealth/CrisperWhisper#3-usage
"""
import torch
@guynich
guynich / main.py
Last active December 24, 2024 20:22
Running nyrahealth/CrisperWhisper model with AMI dataset
"""Example adapted from
https://huggingface.co/nyrahealth/CrisperWhisper#21-usage-with-%F0%9F%A4%97-transformers
Modified for OpenASR leaderboard AMI test dataset.
"""
import torch
from datasets import load_dataset, disable_caching
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline