# Install Saycaret

Saycaret is local dictation for Linux and macOS. These steps install it for
the current user. Check which system this is with `uname -s`, follow the
matching section, run its steps in order, and stop to tell the user if one
fails.

## Linux

### 1. Check the system

Saycaret needs Ubuntu 24.04 or later with GNOME, on Wayland or X11, x86_64.

```sh
uname -m                                  # must print x86_64
. /etc/os-release && echo "$ID $VERSION_ID"   # ubuntu 24.04 or later
echo "$XDG_CURRENT_DESKTOP"               # should contain GNOME
```

If the desktop is not GNOME, stop here and tell the user: Saycaret does not
support it yet.

### 2. Check the system packages

The IBus Python bindings let Saycaret type into other apps. Ubuntu's desktop
usually has them already:

```sh
python3 -c "import gi; gi.require_version('IBus', '1.0')" && echo present
```

Only if that does not print `present`, ask the user, then install them:

```sh
sudo apt install -y python3-gi gir1.2-ibus-1.0
```

### 3. Download and verify

```sh
mkdir -p ~/Applications && cd ~/Applications
curl -fLO https://download.saycaret.com/Saycaret-x86_64.AppImage
curl -fLO https://download.saycaret.com/Saycaret-x86_64.AppImage.sha256
sha256sum -c Saycaret-x86_64.AppImage.sha256
chmod +x Saycaret-x86_64.AppImage
```

### 4. Start it

```sh
nohup ~/Applications/Saycaret-x86_64.AppImage >/dev/null 2>&1 &
```

A setup window opens. The user finishes it: it checks the microphone and
downloads the speech model, about 480 MB.

### 5. Tell the user

Click into any text field, press Ctrl+Alt+Space, speak, and press it again to
stop. Everything runs on this computer; no audio leaves it.

## macOS

### 1. Check the system

Saycaret needs macOS 11 or later on Apple Silicon.

```sh
uname -m                   # must print arm64
sw_vers -productVersion    # 11 or later
```

### 2. Download, verify and install

```sh
cd "$(mktemp -d)"
curl -fLO https://download.saycaret.com/Saycaret-macOS-arm64.dmg
curl -fLO https://download.saycaret.com/Saycaret-macOS-arm64.dmg.sha256
shasum -a 256 -c Saycaret-macOS-arm64.dmg.sha256
mkdir mnt && hdiutil attach -nobrowse -mountpoint ./mnt Saycaret-macOS-arm64.dmg
cp -R ./mnt/Saycaret.app /Applications/
hdiutil detach ./mnt
```

### 3. Start it

```sh
open /Applications/Saycaret.app
```

A setup window opens. The user finishes it: it asks for the Microphone and
Accessibility permissions in System Settings and downloads the speech model,
about 480 MB.

### 4. Tell the user

Click into any text field, tap the right Command key (⌘) on its own, speak,
and tap it again to stop. Or hold it while you speak and let go to stop.
Everything runs on this computer; no audio leaves it.
