From b7f6c5b20cf1e064029ffac19aadbc38795951a7 Mon Sep 17 00:00:00 2001 From: Quan HL Date: Wed, 17 Apr 2024 23:11:03 +0700 Subject: [PATCH] wip --- lib/tasks/tts-task.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tasks/tts-task.js b/lib/tasks/tts-task.js index 9b26381c..6ca0953f 100644 --- a/lib/tasks/tts-task.js +++ b/lib/tasks/tts-task.js @@ -68,7 +68,9 @@ class TtsTask extends Task { tts_engine: vendor, tts_voice: voice, cache_speech_handles: 1, - GOOGLE_TTS_APPLICATION_CREDENTIALS: JSON.stringify(credentials.credentials) + ...(vendor === 'google' && { + GOOGLE_TTS_APPLICATION_CREDENTIALS: JSON.stringify(credentials.credentials) + }) }).catch((err) => this.logger.info({err}, `${this.name}: Error setting tts_engine on endpoint`)); if (!preCache) this.logger.info({vendor, language, voice, model}, `${this.name}:exec`);