From 7a0eb71bae0a65c6eb9f488ea51fe563a105e0fb Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Mon, 20 Oct 2025 15:47:55 +0700 Subject: [PATCH] support gladia stt (#572) --- .../internal/views/speech-services/form.tsx | 12 ++++++++++-- src/vendor/index.tsx | 8 ++++++++ src/vendor/regions/gladia-regions.ts | 14 ++++++++++++++ src/vendor/types.ts | 4 +++- 4 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 src/vendor/regions/gladia-regions.ts diff --git a/src/containers/internal/views/speech-services/form.tsx b/src/containers/internal/views/speech-services/form.tsx index 076e1fa..d1c387c 100644 --- a/src/containers/internal/views/speech-services/form.tsx +++ b/src/containers/internal/views/speech-services/form.tsx @@ -56,6 +56,7 @@ import { VENDOR_DEEPGRAM_FLUX, VENDOR_RESEMBLE, VENDOR_HOUNDIFY, + VENDOR_GLADIA, } from "src/vendor"; import { MSG_REQUIRED_FIELDS } from "src/constants"; import { @@ -510,6 +511,10 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { resemble_tts_uri: resembleTtsUri || null, resemble_tts_use_tls: resembleTtsUseTls ? 1 : 0, }), + ...(vendor === VENDOR_GLADIA && { + api_key: apiKey || null, + region: region || null, + }), }; if (credential && credential.data) { @@ -561,7 +566,8 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { vendor === VENDOR_CARTESIA || vendor === VENDOR_OPENAI || vendor === VENDOR_RESEMBLE || - vendor === VENDOR_DEEPGRAM_FLUX + vendor === VENDOR_DEEPGRAM_FLUX || + vendor === VENDOR_GLADIA ? apiKey : null, }), @@ -1040,6 +1046,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { vendor !== VENDOR_DEEPGRAM_FLUX && vendor !== VENDOR_HOUNDIFY && vendor !== VENDOR_OPENAI && + vendor !== VENDOR_GLADIA && vendor != VENDOR_CUSTOM && (