eSpeak NG — License Information
===============================

This file is a project-specific attribution note. The **binding licence
text** for eSpeak-NG is the GPL-3.0-or-later, a verbatim copy of which
is bundled alongside this file as `GPL-3.0.txt` (root `LICENSES/` and
in-jar `META-INF/licenses/`).

| Field | Value |
|---|---|
| Upstream project | eSpeak NG — open-source phoneme/TTS back-end |
| Upstream | https://github.com/espeak-ng/espeak-ng |
| Derived from | eSpeak by Jonathan Duddington |
| Primary licence | **GPL-3.0-or-later** (SPDX: `GPL-3.0-or-later`) |
| Verbatim text | see `GPL-3.0.txt` in the same directory as this file |
| Upstream COPYING | https://github.com/espeak-ng/espeak-ng/blob/master/COPYING |
| Version pin | 1.52.0 (in `ESpeakNGBinaryManager.java` as `ESPEAK_VERSION`) |

## Multi-licensed sub-directories in the upstream repository

eSpeak-NG's upstream tree also contains smaller components that ship
under permissive licences that sit alongside the GPL-3 main body:

- Some components → **Apache 2.0**
  (upstream `COPYING.APACHE`)
- Windows `getopt` helper → **BSD-2-Clause**
  (upstream `COPYING.BSD2`)

Those sub-components are NOT redistributed by this mod — we only ever
invoke the compiled `espeak-ng` executable that the user downloads at
runtime from the upstream release. The primary licence that applies to
that executable is GPL-3.0-or-later.

## How the Intelligent Villagers mod uses eSpeak-NG

The mod invokes `espeak-ng` as a **separate operating-system process**
via `ProcessBuilder`. No eSpeak-NG source code is copied, embedded,
statically linked, or loaded into the mod's JVM via JNI. See
`LICENSES.md` section 1 for the full discussion of why this stays on
the right side of the GPL's §5 "mere aggregation" clause and keeps the
mod itself under Apache 2.0.

The mod OPTIONALLY offers an in-game download button that fetches the
official `espeak-ng` installer from the upstream GitHub release page.
When a player clicks that button:

  1. The binary is downloaded directly from upstream
     (`github.com/espeak-ng/espeak-ng/releases/...`).
  2. It lands in the player's local cache (`piper_cache/`).
  3. `GPL-3.0.txt` (this directory) is the licence the player
     implicitly accepts when the binary lands on their disk.
  4. The mod's own Java / Kotlin source is never changed, wrapped, or
     recompiled to link against eSpeak-NG.

## Note on espeak-ng.dll shipped inside Piper TTS binaries

The Piper TTS distribution bundles its own copy of `espeak-ng.dll` for
phoneme generation. Piper (MIT) dynamically loads that DLL inside the
`piper.exe` address space. That dynamic-link happens **inside Piper's
own process**, not inside the mod's JVM — so the GPL propagation
question is between Piper and eSpeak-NG, not between the mod and either
of them.

Piper's upstream maintainers have published the binary releases
together with espeak-ng.dll intentionally; that is the supported
distribution shape. Our role is limited to downloading Piper's own
release ZIPs and extracting them — we don't repackage, recompile, or
statically link anything.

## What redistributors must do

When you ship the Intelligent Villagers mod to end users:

  1. Keep this file (`ESPEAK_NG_LICENSE.txt`) alongside your jar.
  2. Keep `GPL-3.0.txt` in the same directory so the licence text
     travels with the attribution note.
  3. Point end users at the upstream eSpeak-NG repository for source
     (the GPL requires offering source; upstream hosts it publicly so
     no separate source-offer CD is needed).

That satisfies GPL-3 §4 / §5 for the path "the mod orchestrates the
end user's eSpeak-NG download; the GPL-licensed binary is delivered
from upstream to the end user directly". If you **vendor** espeak-ng
binaries into your distribution instead of letting them download from
upstream, you become the distributor and must additionally provide the
corresponding source (or a written source offer) yourself.
