diff --git a/src/api/types.ts b/src/api/types.ts index f29159a..93547f4 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -429,6 +429,7 @@ export interface SpeechCredential { label: null | string; cobalt_server_uri: null | string; model_id: null | string; + stt_model_id: null | string; voice_engine: null | string; engine_version: null | string; model: null | string; diff --git a/src/containers/internal/views/speech-services/form.tsx b/src/containers/internal/views/speech-services/form.tsx index 19ff098..4a78519 100644 --- a/src/containers/internal/views/speech-services/form.tsx +++ b/src/containers/internal/views/speech-services/form.tsx @@ -260,7 +260,19 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { switch (vendor) { case VENDOR_PLAYHT: return "Voice Engine"; + case VENDOR_DEEPGRAM: + return "Model ID"; case VENDOR_CARTESIA: + return "TTS Model ID"; + default: + return "Model"; + } + }; + + const getSTTModelLabelByVendor = (vendor: Lowercase) => { + switch (vendor) { + case VENDOR_CARTESIA: + return " STT Model ID"; case VENDOR_DEEPGRAM: return "Model ID"; default: @@ -397,6 +409,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { }), ...(vendor === VENDOR_CARTESIA && { model_id: ttsModelId || null, + stt_model_id: sttModelId || null, options: options || null, }), ...(vendor === VENDOR_CUSTOM && { @@ -758,6 +771,8 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { (vendor === VENDOR_OPENAI || vendor === VENDOR_DEEPGRAM) ) { setSttModelId(credential.data.model_id); + } else if (credential.data.stt_model_id) { + setSttModelId(credential.data.stt_model_id); } if (credential?.data?.playht_tts_uri) { setPlayhtTtsUri(credential.data.playht_tts_uri); @@ -961,7 +976,6 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { vendor !== VENDOR_WHISPER && vendor !== VENDOR_PLAYHT && vendor !== VENDOR_RIMELABS && - vendor !== VENDOR_CARTESIA && vendor !== VENDOR_ELEVENLABS && (