Nik Afiq 0d58e46740
All checks were successful
CI / changes (push) Successful in 1s
CI / test (push) Successful in 6s
CI / build-ai-gateway (push) Has been skipped
CI / build-ha-gateway (push) Has been skipped
CI / build-discord-bot (push) Successful in 1m33s
CI / build-tts-gateway (push) Successful in 37s
CI / build-tts-sidecar (push) Has been skipped
feat: add /speak command for TTS integration
- Implemented the /speak command in Discord bot to synthesize speech using the TTS gateway.
- Added voice handling logic to join voice channels and play synthesized audio.
- Created tests for the new command and voice functionalities.
- Introduced TTSGateway interface for TTS service communication.
- Updated configuration to include TTS gateway address.
- Documented the TTS gateway integration and model artifact distribution process.
2026-07-25 02:09:02 +09:00

41 lines
1.3 KiB
Docker

FROM golang:1.26-alpine AS builder
WORKDIR /workspace
COPY go.work go.work.sum ./
# Manifests only, copied first, so `go mod download` gets its own cache layer
# invalidated only by dependency changes - not by every source edit below.
COPY gen/go.mod gen/go.sum ./gen/
COPY ai-gateway/go.mod ai-gateway/go.sum ./ai-gateway/
COPY ha-gateway/go.mod ha-gateway/go.sum ./ha-gateway/
COPY tts-gateway/go.mod tts-gateway/go.sum ./tts-gateway/
COPY discord-bot/go.mod discord-bot/go.sum ./discord-bot/
WORKDIR /workspace/discord-bot
RUN go mod download
WORKDIR /workspace
COPY gen/ ./gen/
COPY ai-gateway/ ./ai-gateway/
COPY ha-gateway/ ./ha-gateway/
COPY tts-gateway/ ./tts-gateway/
COPY discord-bot/ ./discord-bot/
WORKDIR /workspace/discord-bot
ARG VERSION=dev
RUN CGO_ENABLED=0 GOOS=linux go build \
-ldflags="-s -w -X main.version=${VERSION}" \
-o /discord-bot ./cmd/bot
# /speak needs `ffmpeg` at runtime (github.com/jonas747/dca shells out to it to transcode
# tts-gateway's AAC output to Opus for Discord voice), which rules out a distroless base -
# same reasoning as tts-gateway/Dockerfile.
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /discord-bot /discord-bot
ENTRYPOINT ["/discord-bot"]