feature/go-handler-refactor #1

Merged
billy merged 3 commits from feature/go-handler-refactor into main 2026-02-20 12:34:32 +00:00
Owner
No description provided.
billy added 3 commits 2026-02-20 12:34:28 +00:00
Replace Python streaming STT service with Go for smaller container images.
Local Whisper/ROCm variant (stt_streaming_local.py, Dockerfile.rocm) stays Python.

- AudioBuffer with session state management (listening/responding)
- RMS-based voice activity detection (pure Go, no cgo)
- Interrupt detection during LLM response playback
- JetStream AI_VOICE_STREAM setup
- Session auto-creation and cleanup
- Dockerfile: multi-stage golang:1.25-alpine → scratch
- CI: Gitea Actions with lint/test/release/docker/notify
- e2e_test.go: AudioBuffer lifecycle, interrupt detection, concurrent chunks
- Mock Whisper multipart transcription, realistic sine wave RMS validation
- Benchmarks: addChunk 2.7µs, getAudio 155µs, RMS 18µs, VAD 4.9µs
feat: migrate to typed messages, drop base64, fix AudioBuffer
Some checks failed
CI / Lint (pull_request) Failing after 57s
CI / Test (pull_request) Failing after 1m23s
CI / Release (pull_request) Has been skipped
CI / Docker Build & Push (pull_request) Has been skipped
CI / Notify (pull_request) Successful in 1s
af9f8cc01e
- AudioBuffer getAudio(): use ab.totalBytes directly (eliminates triple-copy)
- Decode STTStreamMessage via natsutil.Decode[messages.STTStreamMessage]
- Audio chunks arrive as raw []byte (no base64 decode needed)
- Publish STTTranscription struct (not map[string]any)
- Interrupts use messages.STTInterrupt
- Remove encoding/base64 import
- Add .dockerignore, GOAMD64=v3 in Dockerfile
- All 15 tests pass
billy merged commit 152a84d7e5 into main 2026-02-20 12:34:32 +00:00
billy deleted branch feature/go-handler-refactor 2026-02-20 12:34:33 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: daviestechlabs/stt-module#1