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
24 lines
465 B
Docker
24 lines
465 B
Docker
# Build stage — Go STT streaming service (HTTP variant)
|
|
FROM golang:1.25-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache ca-certificates
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-w -s" -o /stt-module .
|
|
|
|
# Runtime stage
|
|
FROM scratch
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY --from=builder /stt-module /stt-module
|
|
|
|
USER 65534:65534
|
|
|
|
ENTRYPOINT ["/stt-module"]
|