From 446ae5ae7059834d95db63efd799571d8b0f1d63 Mon Sep 17 00:00:00 2001 From: Quan HL Date: Wed, 10 Apr 2024 18:15:15 +0700 Subject: [PATCH] wip --- lib/utils/speech-utils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/utils/speech-utils.js b/lib/utils/speech-utils.js index 3557cae..23031ab 100644 --- a/lib/utils/speech-utils.js +++ b/lib/utils/speech-utils.js @@ -689,7 +689,12 @@ const fetchLayHTVoices = async(credential) => { 'Accept': 'application/json' }); - return await Promise.all([ get('/api/v2/cloned-voices'), get('/api/v2/voices')]); + const voices = await get('/api/v2/voices'); + let clone_voices = []; + try { + clone_voices = await get('/api/v2/cloned-voices'); + } catch {} + return [clone_voices, voices]; } };