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

3 Commits

Author SHA1 Message Date
af9f8cc01e 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
- 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
2026-02-20 07:11:23 -05:00
2c578aad44 feat: add e2e tests + benchmarks
- 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
2026-02-20 06:45:22 -05:00
9d4d48e693 feat: rewrite stt-module (HTTP variant) in Go
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
2026-02-19 18:04:15 -05:00