BGVoice.Trailer.mov
AI-generated voice-over for NPC dialogue in English Baldur's Gate: Enhanced Edition Trilogy.
BGVoice gives the Sword Coast a voice without tying the mod to one exact EET installation. Its WeiDU installer finds compatible dialogue in the player's current mod setup and attaches the packaged performances only where the speaker and English text match.
- Character-aware voices and context-aware delivery, including narration, whispers, pauses, and changes in emotion.
- Broad coverage of NPC conversations, quests, banter, and encounters across EET.
- Installation-time matching that tolerates different mod selections, dialogue layouts, state numbers, and TLK references.
- Conservative conflict handling: missing, changed, or ambiguous dialogue is left untouched.
Important
BGVoice replaces existing audio on every uniquely matched NPC dialogue line. It does not voice player responses, journal entries, books, or general combat and soundset lines.
- Baldur's Gate: Enhanced Edition Trilogy
- The English game language (
en_US)
Players need only a packaged BGVoice release. Python, API credentials, and the source pipeline are required only to build a new voice catalog.
- Install EET and every dialogue or content mod you want to use.
- Extract the complete BGVoice release into the EET game directory.
- Run
setup-bgvoice.exeand install BGVoice. - If the installation has not been finalized, run
EET_endafter BGVoice.
Recommended order:
dialogue and content mods -> BGVoice -> EET_end
BGVoice can also be installed on an already-finalized EET setup.
WeiDU manages backups and uninstallation. To update safely:
- Uninstall components installed after BGVoice, then uninstall BGVoice.
- Remove the old
bgvoicefolder,setup-bgvoice.exe, andsetup-bgvoice.tp2. - Extract and install the new release.
- Reinstall later components in their original order.
Do not extract a new release over the old bgvoice folder: obsolete catalogs could otherwise
remain installed.
The installer discovers dialogue ownership from the target game, then matches the character name and exact resolved English text. This makes recordings portable across EET versions and modsets without depending on DLG names, state numbers, or TLK string references.
Resources absent from the target installation are skipped. Modified text is skipped. When a dialogue occurrence has conflicting candidate voices, BGVoice leaves it unchanged instead of guessing. The installer prints aggregate coverage totals when it finishes.
The rest of this repository builds the voice catalog and provides a read-only pipeline browser.
Install uv and pnpm, then run:
uv sync
cd frontend
pnpm install
pnpm build
cd ..uv installs Python 3.14 and manages .venv; activation is unnecessary. Put
ie-cli v0.3.0-rc.1 at
.tools/iecli/v0.3.0-rc.1/iecli.exe, or pass --iecli PATH to extraction commands.
Run extraction against the effective EET installation, then publish dialogue attribution:
uv run bgvoice extract-metadata --game "D:\Games\BG\BG2EE-EET"
uv run bgvoice extract-dialogues --game "D:\Games\BG\BG2EE-EET"
uv run bgvoice extract-characters --game "D:\Games\BG\BG2EE-EET"
uv run bgvoice extract-portraits --game "D:\Games\BG\BG2EE-EET"
uv run bgvoice extract-readables --game "D:\Games\BG\BG2EE-EET"
uv run bgvoice attribute-dialoguesCopy .env.example to .env, then generate missing work. Existing voices, directions, audio, and
persisted provider jobs are reused by default.
uv run bgvoice generate --voice Imoen --voice Gorion --lines-per-voice 100
uv run bgvoice audit-directionsUse uv run bgvoice generate --help for full-catalog generation, sparse shared profiles, or
deliberate voice recreation.
cd frontend
pnpm build
cd ..
uv run bgvoice webOpen http://127.0.0.1:8000.
uv run python scripts/package_mod.py `
data/bgvoice-v1.3.0 `
data/BGVoice-v1.3.0.zip `
--version 1.3.0The packager exports the WeiDU mod, parse-checks its sources, verifies the archive, and prints its
SHA-256 digest. Generated databases and releases stay under the ignored data/ directory.
uv run ruff format --check .
uv run ruff check .
uv run ty check
uv run pytest --cov=bgvoice --cov-report=term-missing:skip-covered
uv build
cd frontend
pnpm typecheck
pnpm lint
pnpm test:coverage
pnpm buildThe Python pipeline uses typed Pydantic and LanceDB records. A single Protobuf contract at
proto/bgvoice/v1/pipeline.proto defines the Connect boundary
shared by the Python backend and React frontend.