SpeechKit

module
v0.81.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2026 License: Apache-2.0

README

SpeechKit

Go Reference License Go

SpeechKit is an open-source, local-first speech framework. Its platform-neutral Go kernel handles dictation, one-shot voice assistance and realtime voice conversations over a pluggable set of speech-to-text, text-to-speech, LLM and realtime providers. Embed it in your own Go program, run it as a self-hosted server, or drive it from the included CLI and MCP server.

Beta. Public APIs, config keys and defaults can still change between minor releases; pin versions. Breaking changes are called out in CHANGELOG.md.

What is in this repository

Path What it is
pkg/speechkit/ The Go SDK: mode contracts, provider adapters, routing, wake word, TTS, client
app/cmd/speechkit-server/ Self-hosted Linux server with HTTP/WebSocket APIs (OpenAPI and AsyncAPI contracts in docs/server/)
app/cmd/speechkit-cli/ CLI for diagnostics, scaffolding and quick actions against a server
app/cmd/speechkit-mcp/ MCP server so coding agents can read the docs, validate payloads and operate a server
clients/typescript/ TypeScript server client with an optional Mastra voice adapter, realtime voice client and a web-component voice UI kit
android/ Android library modules, keyboard (IME) and assistant app
examples/ Small runnable programs, one per integration pattern
deploy/ Dockerfile, Compose files and server configuration templates
docs/ Framework, server, MCP and API documentation

The SDK (pkg/speechkit/...) is the root Go module. The reference apps (app/cmd, app/internal) are the nested module .../app, which requires the root module; the committed go.work joins both, so run app commands from the repository root with ./app/... paths. SDK code never imports the app module.

Modes

Mode Purpose Boundary
Dictation Turn speech into text. STT only. No LLM rewriting.
Assist Turn speech or text into one useful result. Codeword, utility or LLM output, optional TTS.
Voice Agent Realtime audio-to-audio dialogue. Live conversation with a realtime provider.

Hands-Free is an activation layer over the three modes (wake word, capture, auto-end and spoken output), not a fourth mode. Words and Replacements customize recognition and apply deterministic text transformations; see the Words and Replacements standard.

Providers

Local: whisper.cpp, Piper, Ollama-style local LLM endpoints and sherpa-onnx wake words. Cloud (bring your own key): OpenAI, Groq, Deepgram, AssemblyAI, Hugging Face, OpenRouter, Azure AI / Foundry, Google Cloud STT/TTS and Gemini Live. A fresh install runs local-only with no cloud keys. The provider option matrix and the voice capability matrix list what each provider supports.

Quick start

Embed the Go kernel:

go get github.com/kombifyio/SpeechKit

Import only what your host needs: pkg/speechkit/dictation, pkg/speechkit/wakeword, pkg/speechkit/tts, pkg/speechkit/companion (one-shot voice companion hosts), pkg/speechkit/speaker and pkg/speechkit/x/client (server-connected apps). To configure from a file:

settings, policy, err := hostconfig.Load("config.toml")

A missing file yields the local-only defaults; a malformed file returns an error wrapping hostconfig.ErrMalformedConfig. config.example.toml lists every key.

Run a provider in-process, no server needed:

OPENAI_API_KEY=... go run ./examples/voice-agent/in-process

Run the self-hosted server:

docker pull ghcr.io/kombifyio/speechkit-server:latest

Compose files and configuration templates are in deploy/; the server documentation and deployment notes cover modes, authentication and providers. Public binds must use an authenticated auth_mode; never expose auth_mode = "none".

Agent tooling:

go run ./app/cmd/speechkit-mcp --mode=docs,test
go run ./app/cmd/speechkit-cli status --server "$SPEECHKIT_SERVER_URL" --token "$SPEECHKIT_SERVER_TOKEN"

Verify a change

go test ./pkg/... ./app/cmd/speechkit-cli/... ./app/cmd/speechkit-mcp/... ./examples/...
GOOS=linux CGO_ENABLED=0 go build ./app/cmd/speechkit-server ./app/cmd/speechkit-mcp ./app/cmd/speechkit-cli

The full set is in CONTRIBUTING.md. Most of pkg/speechkit is pure Go; packages that need cgo or an external binary are listed in the SDK surface boundary and fail with a typed error when the dependency is absent.

Documentation

Document Purpose
docs/README.md Documentation index
docs/sdk/README.md SDK in 10 minutes
docs/sdk/custom-provider.md Add your own STT, TTS or live provider
docs/speechkit-framework-api.md Framework API contracts
docs/server/README.md Server target
docs/mcp/README.md MCP server
android/README.md Android modules
examples/README.md Runnable examples

Releases

Windows and macOS desktop builds, the server image ghcr.io/kombifyio/speechkit-server and release notes are published on GitHub Releases. Desktop builds are not code-signed yet; each release carries checksums and an UNSIGNED-*-RELEASE.txt notice. Download only from the official releases page.

Contributing and support

Issues and pull requests are welcome; see CONTRIBUTING.md, SUPPORT.md, SECURITY.md and the Code of Conduct.

License

Apache-2.0, see LICENSE. The Android keyboard links a GPL-3.0 fork of HeliBoard; see android/GPL-NOTICE.md.

Directories

Path Synopsis
examples module
internal
dataprofilev1
Code generated by project-data-profile.mjs; DO NOT EDIT.
Code generated by project-data-profile.mjs; DO NOT EDIT.
denialv1
Code generated by project-data-profile.mjs; DO NOT EDIT.
Code generated by project-data-profile.mjs; DO NOT EDIT.
editionv1
Code generated by project-data-profile.mjs; DO NOT EDIT.
Code generated by project-data-profile.mjs; DO NOT EDIT.
pkg
speechkit
Package speechkit provides the public SDK for embedding SpeechKit voice capture, transcription, and assist/voice-agent pipelines into host applications.
Package speechkit provides the public SDK for embedding SpeechKit voice capture, transcription, and assist/voice-agent pipelines into host applications.
speechkit/agentkit
Package agentkit provides a small Go harness for building SpeechKit Voice Agent hosts.
Package agentkit provides a small Go harness for building SpeechKit Voice Agent hosts.
speechkit/assist
Package assist provides an embeddable Assist Mode service.
Package assist provides an embeddable Assist Mode service.
speechkit/audio
Package audio provides the shared PCM audio primitives for the SpeechKit capture format: 16kHz S16 mono constants, WAV framing, duration math, and RMS level estimation.
Package audio provides the shared PCM audio primitives for the SpeechKit capture format: 16kHz S16 mono constants, WAV framing, duration math, and RMS level estimation.
speechkit/catalog
Package catalog ships the built-in SpeechKit provider and model catalog.
Package catalog ships the built-in SpeechKit provider and model catalog.
speechkit/companion
Package companion provides small composers for hands-free SpeechKit hosts.
Package companion provides small composers for hands-free SpeechKit hosts.
speechkit/customize
Package customize defines Words, Replacements and shared recognition hints.
Package customize defines Words, Replacements and shared recognition hints.
speechkit/dictation
Package dictation provides an embeddable strict Dictation runtime.
Package dictation provides an embeddable strict Dictation runtime.
speechkit/homegraph
Package homegraph consumes the Cloud home graph for paired voice output.
Package homegraph consumes the Cloud home graph for paired voice output.
speechkit/internal/logutil
Package logutil resolves optional per-instance loggers for SpeechKit library types.
Package logutil resolves optional per-instance loggers for SpeechKit library types.
speechkit/internal/pcmresample
Package pcmresample holds the PCM16 rate conversion shared by the realtime Voice Agent providers and the realtime STT adapters, so an STT adapter does not link the Voice Agent package for it.
Package pcmresample holds the PCM16 rate conversion shared by the realtime Voice Agent providers and the realtime STT adapters, so an STT adapter does not link the Voice Agent package for it.
speechkit/internal/procguard
Package procguard ties long-lived child processes to the lifetime of the process that spawned them.
Package procguard ties long-lived child processes to the lifetime of the process that spawned them.
speechkit/internal/sdkparity
Package sdkparity holds test-only parity harnesses that run the same behavioral assertions against the public SDK and reference-app implementations.
Package sdkparity holds test-only parity harnesses that run the same behavioral assertions against the public SDK and reference-app implementations.
speechkit/internal/speakercontract
Package speakercontract holds test-only conformance helpers that speaker provider tests use to assert the public speaker contracts: complete diarization results, well-formed realtime frames, unknown labels left unattributed, and provider errors that name the provider without leaking credentials.
Package speakercontract holds test-only conformance helpers that speaker provider tests use to assert the public speaker contracts: complete diarization results, well-formed realtime frames, unknown labels left unattributed, and provider errors that name the provider without leaking credentials.
speechkit/internal/telemetry
Package telemetry records named SpeechKit framework outcomes on the active OpenTelemetry span.
Package telemetry records named SpeechKit framework outcomes on the active OpenTelemetry span.
speechkit/internal/testutil
Package testutil holds test helpers shared across SpeechKit's kernel packages — temp-dir builders, fake clocks, identity injectors.
Package testutil holds test helpers shared across SpeechKit's kernel packages — temp-dir builders, fake clocks, identity injectors.
speechkit/internal/ttsroute
Package ttsroute holds the single source of truth that maps a Voice-Output profile ID to the provider name the TTS routers use internally.
Package ttsroute holds the single source of truth that maps a Voice-Output profile ID to the provider name the TTS routers use internally.
speechkit/lifecycle
Package lifecycle owns mode start/stop orchestration and refcounted shared dependencies for SpeechKit hosts.
Package lifecycle owns mode start/stop orchestration and refcounted shared dependencies for SpeechKit hosts.
speechkit/localization
Package localization resolves stable SpeechKit message IDs against the repository-owned locale catalogs.
Package localization resolves stable SpeechKit message IDs against the repository-owned locale catalogs.
speechkit/netsec
Package netsec provides centralized network security primitives used by every HTTP-based provider in SpeechKit (STT, TTS, LLM, downloads).
Package netsec provides centralized network security primitives used by every HTTP-based provider in SpeechKit (STT, TTS, LLM, downloads).
speechkit/provideropts
Package provideropts defines SpeechKit's provider-neutral voice option vocabulary and the manifest/resolve types used by concrete provider adapters.
Package provideropts defines SpeechKit's provider-neutral voice option vocabulary and the manifest/resolve types used by concrete provider adapters.
speechkit/speaker
Package speaker defines SpeechKit's public speaker diarization and attribution contracts.
Package speaker defines SpeechKit's public speaker diarization and attribution contracts.
speechkit/storage
Package storage defines the public storage-backend contract: backend capabilities and metadata, install/device/user/tenant scopes with their enforcement policies, and the configuration shape hosts use to construct a backend.
Package storage defines the public storage-backend contract: backend capabilities and metadata, install/device/user/tenant scopes with their enforcement policies, and the configuration shape hosts use to construct a backend.
speechkit/stt
Package stt defines the SpeechKit speech-to-text contracts: the STTProvider interface, transcribe options and results, the Router that picks a provider per request, the AsTranscriber bridge into the pipeline, and the helpers the adapters share.
Package stt defines the SpeechKit speech-to-text contracts: the STTProvider interface, transcribe options and results, the Router that picks a provider per request, the AsTranscriber bridge into the pipeline, and the helpers the adapters share.
speechkit/tts
Package tts exposes the embeddable SpeechKit text-to-speech surface.
Package tts exposes the embeddable SpeechKit text-to-speech surface.
speechkit/voiceagent
Package voiceagent provides an embeddable Voice Agent service.
Package voiceagent provides an embeddable Voice Agent service.
speechkit/voiceagent/cascaded
Package cascaded implements a turn-based STT -> LLM -> TTS voice agent provider.
Package cascaded implements a turn-based STT -> LLM -> TTS voice agent provider.
speechkit/voiceagent/live
Package live exposes the low-level Voice Agent realtime-protocol types.
Package live exposes the low-level Voice Agent realtime-protocol types.
speechkit/wakeword
Package wakeword exposes embeddable SpeechKit wake-word contracts: the phrase catalog, detection events, the hotkey Dispatcher, AutoEndPolicy and the engine-neutral Detector and Pipeline.
Package wakeword exposes embeddable SpeechKit wake-word contracts: the phrase catalog, detection events, the hotkey Dispatcher, AutoEndPolicy and the engine-neutral Detector and Pipeline.
speechkit/wakeword/sherpa
Package sherpa is the sherpa-onnx keyword-spotting engine for pkg/speechkit/wakeword.
Package sherpa is the sherpa-onnx keyword-spotting engine for pkg/speechkit/wakeword.
speechkit/x module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL