diff --git a/meet-ce/backend/src/config/internal-config.ts b/meet-ce/backend/src/config/internal-config.ts index cf4e709c..818e147d 100644 --- a/meet-ce/backend/src/config/internal-config.ts +++ b/meet-ce/backend/src/config/internal-config.ts @@ -49,7 +49,7 @@ export const INTERNAL_CONFIG = { PARTICIPANT_MAX_CONCURRENT_NAME_REQUESTS: '20', // Maximum number of request by the same name at the same time allowed PARTICIPANT_NAME_RESERVATION_TTL: '12h' as StringValue, // Time-to-live for participant name reservations - CAPTIONS_AGENT_NAME: 'agent-meet-captions', + CAPTIONS_AGENT_NAME: 'agent-speech-processing', // MongoDB Schema Versions // These define the current schema version for each collection diff --git a/meet-ce/backend/src/services/token.service.ts b/meet-ce/backend/src/services/token.service.ts index 84fc6c47..f0af729c 100644 --- a/meet-ce/backend/src/services/token.service.ts +++ b/meet-ce/backend/src/services/token.service.ts @@ -71,17 +71,22 @@ export class TokenService { at.addGrant(grants); } - const captionsEnabledInEnv = MEET_ENV.CAPTIONS_ENABLED === 'true'; + const captionsEnabledGlobally = MEET_ENV.CAPTIONS_ENABLED === 'true'; const captionsEnabledInRoom = Boolean(roomWithCaptions); // Warn if configuration is inconsistent - if (!captionsEnabledInEnv && captionsEnabledInRoom) { - this.logger.warn( - `Captions feature is disabled in environment but Room is created with captions enabled. Please enable captions in environment by setting MEET_CAPTIONS_ENABLED=true to ensure proper functionality.` - ); + if (!captionsEnabledGlobally) { + if (captionsEnabledInRoom) { + this.logger.warn( + `Captions feature is disabled in environment but Room is created with captions enabled. ` + + `Please enable captions in environment by setting MEET_CAPTIONS_ENABLED=true to ensure proper functionality.` + ); + } + + return await at.toJwt(); } - if (captionsEnabledInEnv && captionsEnabledInRoom) { + if (captionsEnabledInRoom) { this.logger.debug('Activating Captions Agent. Configuring Room Agent Dispatch.'); at.roomConfig = new RoomConfiguration({ agents: [