From 938854c4b33bda1367b9289ed7c670f669e1d7b8 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Wed, 3 Apr 2024 10:39:08 -0400 Subject: [PATCH] fix deepgram returning an empty array --- lib/utils/transcription-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/transcription-utils.js b/lib/utils/transcription-utils.js index c942c3e8..f7023118 100644 --- a/lib/utils/transcription-utils.js +++ b/lib/utils/transcription-utils.js @@ -270,7 +270,7 @@ const normalizeDeepgram = (evt, channel, language, shortUtterance) => { language_code: language, channel_tag: channel, is_final: shortUtterance ? evt.is_final : evt.speech_final, - alternatives: [alternatives[0]], + alternatives: alternatives.length ? [alternatives[0]] : [], vendor: { name: 'deepgram', evt: copy