Skip to content

About

Video-game mumble speech synthesis (Undertale, Banjo-Kazooie, Animal Crossing styles). Rust core with web, Godot, Unity and C bindings.

Resources

Contributing

Stars

17 stars

Watchers

0 watching

Forks

Repository files navigation

mumble-speech

Video-game "mumble speech" synthesis: turn a line of text into the babble that characters speak in games, in three styles.

Style Rule Reference
beep The same beep for every character Undertale
grunt A few grunts per voice, never the same twice in a row Banjo-Kazooie
alphabet A vowel-based sound for every letter Animal Crossing

One implementation in Rust, deterministic and bit-identical across platforms for the same text, voice and sample rate, with bindings for the web (WebAssembly/npm), Godot, Unity and a C ABI. The Godot and Unity speakers always render at 48 kHz and let the engine resample to the output device, so a line gives the same samples on every machine.

Status: early development (0.x: the API may still change). Documentation and playground: https://mumble-speech.github.io/ · Releases · Changelog · npm · crates.io · docs.rs

Repository layout

crates/mumble-core/   Rust core (crate `mumble-speech`)
crates/mumble-wasm/   WebAssembly exports
packages/web/         npm package @mumble-speech/web (WASM inlined, TypeScript API)
crates/mumble-ffi/    C ABI (cdylib + staticlib)
bindings/c/           mumble.h, CMake tests and example
crates/mumble-godot/  Godot 4 GDExtension
bindings/godot/       Godot addon (desktop and web), example scene and tests
scripts/godot-web/    build, export and browser tests of the Godot web libraries (without and with threads)
bindings/unity/       Unity package (UPM): C# interop, components, EditMode tests
apps/playground/      web playground to try the styles (private, not published)
docs/                 documentation site (VitePress), published with the playground
specs/                requirements, design and plan (spec-driven: start here)

Development

Requirements: Rust (stable) with the wasm32-unknown-unknown target, Node.js 24+ and wasm-bindgen-cli 0.2.129 (cargo install wasm-bindgen-cli --version 0.2.129).

cargo test                    # core tests
cargo test --release          # also runs the performance check
npm install
npm run build --workspace @mumble-speech/web       # WASM + TypeScript
npm run dev --workspace @mumble-speech/playground   # http://localhost:5173
npm test                      # web package and playground tests
cargo build -p mumble-ffi --release                 # C ABI
cmake -S bindings/c -B build/c && cmake --build build/c && ctest --test-dir build/c
bindings/godot/build.sh && godot --headless --path bindings/godot -s res://tests/run_tests.gd
bindings/godot/build.sh web    # Godot web libraries, with and without threads (pinned nightly Rust + Emscripten 3.1.74)
bindings/unity/build.sh        # native library into the Unity package's Plugins/

To use the Unity package, install it by git URL (#upm), OpenUPM or the release tarball, not from this checkout: bindings/unity here has no native libraries until you build them (from source, also for Windows without a POSIX shell).

Changes start from the specs: see specs/README.md for the process.

Inspiration

The project was inspired by UnitOfTime's video I Gave My NPCs Voices Without Recording Anything.

License

Dual-licensed under MIT or Apache-2.0, at your option.

About

Video-game mumble speech synthesis (Undertale, Banjo-Kazooie, Animal Crossing styles). Rust core with web, Godot, Unity and C bindings.

Resources

Contributing

Stars

17 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages