diff --git a/src/api/constants.ts b/src/api/constants.ts index 9b3b9e4..79fdbcd 100644 --- a/src/api/constants.ts +++ b/src/api/constants.ts @@ -245,6 +245,14 @@ export const VERBIO_STT_MODELS = [ export const DEFAULT_VERBIO_MODEL = "V1"; +// ASSEMBLYAI +export const ASSEMBLYAI_STT_VERSIONS = [ + { name: "V2", value: "v2" }, + { name: "V3", value: "v3" }, +]; + +export const DEFAULT_ASSEMBLYAI_STT_VERSION = "v2"; + export const ADDITIONAL_SPEECH_VENDORS: Lowercase[] = ["speechmatics"]; // Google Custom Voice reported usage options diff --git a/src/api/types.ts b/src/api/types.ts index 5da0783..6089461 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -432,6 +432,7 @@ export interface SpeechCredential { stt_model_id: null | string; voice_engine: null | string; engine_version: null | string; + service_version: null | string; model: null | string; options: null | string; deepgram_stt_uri: null | string; diff --git a/src/containers/internal/views/speech-services/form.tsx b/src/containers/internal/views/speech-services/form.tsx index 20c39fc..7199af3 100644 --- a/src/containers/internal/views/speech-services/form.tsx +++ b/src/containers/internal/views/speech-services/form.tsx @@ -81,6 +81,8 @@ import type { import { setAccountFilter, setLocation } from "src/store/localStore"; import { ADDITIONAL_SPEECH_VENDORS, + ASSEMBLYAI_STT_VERSIONS, + DEFAULT_ASSEMBLYAI_STT_VERSION, DEFAULT_CARTESIA_OPTIONS, DEFAULT_ELEVENLABS_OPTIONS, DEFAULT_GOOGLE_CUSTOM_VOICE, @@ -131,6 +133,9 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { const [ttsModelId, setTtsModelId] = useState(""); const [sttModelId, setSttModelId] = useState(""); const [engineVersion, setEngineVersion] = useState(DEFAULT_VERBIO_MODEL); + const [serviceVersion, setServiceVersion] = useState( + DEFAULT_ASSEMBLYAI_STT_VERSION, + ); const [instanceId, setInstanceId] = useState(""); const [initialCheckCustomTts, setInitialCheckCustomTts] = useState(false); const [initialCheckCustomStt, setInitialCheckCustomStt] = useState(false); @@ -468,6 +473,9 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { ...(vendor === VENDOR_VERBIO && { engine_version: engineVersion, }), + ...(vendor === VENDOR_ASSEMBLYAI && { + service_version: serviceVersion || null, + }), ...(vendor === VENDOR_PLAYHT && { playht_tts_uri: playhtTtsUri || null, }), @@ -842,6 +850,9 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { if (credential?.data?.engine_version) { setEngineVersion(credential.data.engine_version); } + if (credential?.data?.service_version) { + setServiceVersion(credential.data.service_version); + } if (credential?.data?.speechmatics_stt_uri) { setInitialSpeechMaticsOnpremCheck( @@ -1522,6 +1533,22 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { )} + {vendor === VENDOR_ASSEMBLYAI && ( +
+ + { + setServiceVersion(e.target.value); + }} + /> +
+ )} {vendor === VENDOR_AWS && (