From 92d73fe12d766db97a3430d592e1205a86165fb1 Mon Sep 17 00:00:00 2001 From: MythEclipse Date: Sun, 14 Jun 2026 00:57:08 +0700 Subject: [PATCH] chore(services): update components based on recent changes Changes: .env.example | 5 +++++ services/discord-gateway/src/modules/voice-recording/recorder.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) --- .env.example | 5 +++++ .../discord-gateway/src/modules/voice-recording/recorder.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index a2dda43..981b1bc 100644 --- a/.env.example +++ b/.env.example @@ -58,6 +58,11 @@ POSTGRES_POOL_MAX=10 # Maximum pool connections (default: 10) # === Redis === REDIS_URL=redis://localhost:6379 # Redis connection string (default: redis://localhost:6379) +# === Voice PCM WebSocket (direct gateway→backend, bypasses Redis) === +VOICE_PCM_WS_ENABLED=true # Use direct WS for PCM audio (default: true) +BACKEND_WS_URL=ws://backend:3000/ws # Backend WebSocket URL for gateway PCM streaming +BACKEND_WS_TOKEN= # REQUIRED if VOICE_PCM_WS_ENABLED=true. Internal shared secret + # === Attachments === TELE_UPLOAD_URL=https://upload.asepharyana.my.id/api/upload # Attachment upload endpoint (default) ATTACHMENT_UPLOAD_TIMEOUT_MS=30000 # Upload timeout in ms (default: 30000) diff --git a/services/discord-gateway/src/modules/voice-recording/recorder.ts b/services/discord-gateway/src/modules/voice-recording/recorder.ts index 32c3b63..5775e08 100644 --- a/services/discord-gateway/src/modules/voice-recording/recorder.ts +++ b/services/discord-gateway/src/modules/voice-recording/recorder.ts @@ -141,7 +141,7 @@ export async function startRecording( activeSessions, recordingsDir, pcmSender: _pcmWsClient - ? (pcm, userId) => _pcmWsClient.sendPcm(userId, pcm) + ? (pcm, userId) => _pcmWsClient!.sendPcm(userId, pcm) : undefined, });