-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.command
More file actions
executable file
·85 lines (71 loc) · 3.63 KB
/
Copy pathinstall.command
File metadata and controls
executable file
·85 lines (71 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/sh
# Webinar Transcriber - setup (NO Homebrew). Works on macOS 12 (Monterey) and up, Intel or Apple Silicon.
# Downloads: static ffmpeg + Mozilla whisperfile + the BlackHole audio driver. Nothing is uploaded; no fees.
set -u
PKG="$(cd "$(dirname "$0")" && pwd)"
HOME_DIR="$HOME/webinar-transcribe"
say(){ printf "\n%s\n" "$1"; }
die(){ printf "\n%s\n" "$1"; echo "See the Troubleshooting section in the README."; printf "Press Enter to close. "; read d; exit 1; }
clear
cat <<'BANNER'
============================================
Webinar Transcriber - Setup (no Homebrew)
============================================
Installs free tools to RECORD and TRANSCRIBE any
audio playing on your Mac. Everything runs locally -
nothing is uploaded, no account, no fees.
You may be asked for your Mac password (for the audio
driver). The transcriber download is ~465 MB.
BANNER
printf "\nPress Enter to begin... "; read d
ARCH=$(uname -m)
case "$ARCH" in
arm64) FF_URL="https://github.com/eugeneware/ffmpeg-static/releases/download/b6.1.1/ffmpeg-darwin-arm64" ;;
x86_64) FF_URL="https://github.com/eugeneware/ffmpeg-static/releases/download/b6.1.1/ffmpeg-darwin-x64" ;;
*) die "Unsupported CPU type: $ARCH" ;;
esac
WF_URL="https://huggingface.co/Mozilla/whisperfile/resolve/main/whisper-small.en.llamafile"
BH_URL="https://existential.audio/downloads/BlackHole2ch-0.7.0.pkg"
mkdir -p "$HOME_DIR/recordings"
cd "$HOME_DIR" || die "Could not create $HOME_DIR"
# 1. Apple Command Line Tools (whisperfile needs these to bootstrap on Apple Silicon)
if ! xcode-select -p >/dev/null 2>&1; then
say "[1/5] Installing Apple Command Line Tools - click 'Install' in the popup..."
xcode-select --install 2>/dev/null
printf " waiting for them to finish (this can take a while)"
until xcode-select -p >/dev/null 2>&1; do printf "."; sleep 5; done
echo " done."
else
say "[1/5] Command Line Tools already installed."
fi
# 2. ffmpeg (records the audio) - static binary, no dependencies
say "[2/5] Downloading ffmpeg ($ARCH)..."
curl -fL -o ffmpeg "$FF_URL" || die "ffmpeg download failed - check your internet."
chmod +x ffmpeg; xattr -d com.apple.quarantine ffmpeg 2>/dev/null
# 3. whisperfile (transcribes, fully offline, single self-contained file)
say "[3/5] Downloading the transcriber (~465 MB, one time)..."
curl -fL -o whisper.llamafile "$WF_URL" || die "Transcriber download failed - check your internet."
chmod +x whisper.llamafile; xattr -d com.apple.quarantine whisper.llamafile 2>/dev/null
# 4. Lay down the recorder script + Desktop launcher
say "[4/5] Installing the recorder script + Desktop shortcut..."
cp "$PKG/grab.sh" "$HOME_DIR/grab.sh"; chmod +x "$HOME_DIR/grab.sh"
if [ -f "$PKG/record-webinar.command" ]; then
cp "$PKG/record-webinar.command" "$HOME/Desktop/Record Webinar.command"
chmod +x "$HOME/Desktop/Record Webinar.command"
xattr -d com.apple.quarantine "$HOME/Desktop/Record Webinar.command" 2>/dev/null
fi
# 5. BlackHole audio driver (lets the Mac record its own sound)
say "[5/5] Downloading the BlackHole audio driver..."
curl -fL -o BlackHole.pkg "$BH_URL" || die "BlackHole download failed - check your internet."
say "Opening the BlackHole installer - click through it and enter your Mac password."
open BlackHole.pkg
say "DONE - software installed!"
cat <<'NEXT'
TWO manual steps left (see the README "Audio setup"):
1) Finish the BlackHole installer, then RESTART your Mac
(or run: sudo killall coreaudiod ).
2) In Audio MIDI Setup, create a Multi-Output Device named
"Webinar Capture" (check BlackHole 2ch + your speakers).
After that: double-click "Record Webinar" on your Desktop.
NEXT
printf "\nPress Enter to close. "; read d