gotst is a speech-focused Godot 4 GDExtension for local ASR/TTS runtimes.
It is intentionally separate from:
godorama: genericllama.cppintegrationgonx: generic ONNX Runtime integration
The goal is to keep speech-specific runtime logic in one native boundary while still allowing the game to use godorama and gonx directly for other features.
This repository currently provides:
- a reusable native core target,
gotst::core - a Godot-facing GDExtension target,
gotst::godot - a minimal
GotstSpeechRuntimeConfigresource - a
GotstSpeechRuntimenative helper API used from Godot-side Qwen adapters - a superbuild-friendly CMake layout that embeds
godoramaandgonxas internal core dependencies - native implementations of the current hot speech kernels:
- Qwen3-ASR log-mel frontend
- packed-array row slicing/concatenation helpers
- last-row argmax and sampling helpers
- Qwen3-TTS initial prompt assembly helpers
- tokenizer-decoder waveform conversion and normalization
gotst is intended to own:
- speech-specific DSP and feature extraction
- speech-side tensor and packed-array math that is too heavy for GDScript
- hybrid GGUF + ONNX orchestration for speech models as it migrates out of the game layer
- speech token/code helpers
- waveform post-processing
- speech runtime contracts exposed to Godot
gotst should not own:
- generic llama.cpp wrapper APIs
- generic ONNX session APIs
- scene logic or UI orchestration
See docs/setup_build.md for standalone setup,
GDExtension, native test, and CLI build instructions.
Quick Debug addon build with sibling godorama and gonx checkouts:
cmake -S . -B build/debug -G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DGOTST_BUILD_GDEXTENSION=ON \
-DGOTST_BUILD_TESTS=OFF \
-DGODOTCPP_TARGET=template_debug
cmake --build build/debug --parallelThe built shared library is emitted into addons/gotst/bin/, and the manifest lives at:
addons/gotst/gotst.gdextension
This keeps the repo directly usable as an addon workspace.
- The consuming Godot project owns request lifecycle, conversation orchestration, scene logic, UI, and audio playback policy.
gotstowns the speech-specific native kernels and runtime helpers exposed through its Godot boundary.godoramaremains the generic GGUF bridge.gonxremains the generic ONNX bridge.
gotst builds on substantial open source work from the speech, inference, and
Godot ecosystems:
- Godot Engine and
godot-cppprovide the Godot 4 GDExtension API and C++ binding layer. godoramaprovides the generic GGUF bridge used bygotstfor local llama.cpp-backed model execution.gonxprovides the generic ONNX Runtime bridge used bygotstfor ONNX session management and execution-provider selection.- llama.cpp and ggml provide the local GGUF inference runtime used through
godorama. - ONNX Runtime provides the ONNX model execution runtime used through
gonx. - tokenizers-cpp, SentencePiece, and msgpack-c support tokenizer loading and text tokenization paths.
- The Irodori TTS model family informs the native Irodori speech synthesis session and its exported ONNX/CoreML artifact layout.
- The Qwen ASR and Qwen TTS model families inform the native Qwen speech frontend, tokenization, embedding, decoding, and hybrid GGUF/ONNX pipeline paths.
- TEN-VAD provides the vendored voice activity detection runtime under
thirdparty/ten_vad. It is distributed under its own upstream license terms, including additional conditions on top of Apache-2.0, and includes LPCNet-derived BSD notices. Seethirdparty/ten_vad/LICENSEandthirdparty/ten_vad/NOTICES.
This section is an acknowledgement, not a complete third-party notice. Preserve the applicable upstream license and notice files when redistributing gotst or binary builds that include these components. Model weights, tokenizer assets, converted ONNX/CoreML artifacts, and GGUF files are external inputs to gotst; redistribute them only under their own model cards, licenses, and acceptable-use terms.
- Move more of the Qwen TTS autoregressive inner loop from GDScript into native code.
- Add cancellable session APIs for incremental speech streaming.
- Expand native tests beyond backend inspection into deterministic DSP/sampling coverage.
- Add integration tests that validate a full hybrid speech roundtrip against fixtures.