mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2025-12-19 05:37:43 +00:00
support deepgram EU-hosted STT (#555)
* support deepgram EU-hosted STT * wip * fix review comment * wip * wip
This commit is contained in:
@@ -418,6 +418,11 @@ export const CurrencySymbol: Currency = {
|
||||
usd: "$",
|
||||
};
|
||||
|
||||
export const DEEPGRAM_STT_ENPOINT = [
|
||||
{ name: "US (Default)", value: "" },
|
||||
{ name: "EU-hosted", value: "api.eu.deepgram.com" },
|
||||
];
|
||||
|
||||
/** User scope values values */
|
||||
export const USER_ADMIN = "admin";
|
||||
export const USER_SP = "service_provider";
|
||||
|
||||
@@ -83,6 +83,7 @@ import { setAccountFilter, setLocation } from "src/store/localStore";
|
||||
import {
|
||||
ADDITIONAL_SPEECH_VENDORS,
|
||||
ASSEMBLYAI_STT_VERSIONS,
|
||||
DEEPGRAM_STT_ENPOINT,
|
||||
DEFAULT_ASSEMBLYAI_STT_VERSION,
|
||||
DEFAULT_CARTESIA_OPTIONS,
|
||||
DEFAULT_ELEVENLABS_OPTIONS,
|
||||
@@ -811,9 +812,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
||||
setUseCustomVoicesCheck(json.length > 0);
|
||||
});
|
||||
}
|
||||
if (credential?.data?.deepgram_stt_uri) {
|
||||
setDeepgramSttUri(credential.data.deepgram_stt_uri);
|
||||
}
|
||||
setDeepgramSttUri(credential?.data?.deepgram_stt_uri || "");
|
||||
if (credential?.data?.deepgram_tts_uri) {
|
||||
setDeepgramTtsUri(credential.data.deepgram_tts_uri);
|
||||
}
|
||||
@@ -822,7 +821,12 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
||||
credential?.data?.deepgram_stt_use_tls > 0 ? true : false,
|
||||
);
|
||||
}
|
||||
setInitialDeepgramOnpremCheck(hasValue(credential?.data?.deepgram_stt_uri));
|
||||
setInitialDeepgramOnpremCheck(
|
||||
hasValue(credential?.data?.deepgram_stt_uri) &&
|
||||
!DEEPGRAM_STT_ENPOINT.map((e) => e.value).includes(
|
||||
credential?.data?.deepgram_stt_uri,
|
||||
),
|
||||
);
|
||||
|
||||
if (credential?.data?.user_id) {
|
||||
setUserId(credential.data.user_id);
|
||||
@@ -2033,6 +2037,19 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
||||
onChange={(e) => setApiKey(e.target.value)}
|
||||
disabled={credential ? true : false}
|
||||
/>
|
||||
<label htmlFor={`${vendor}_deepgram_stt_enpoint`}>
|
||||
Deepgram STT Endpoint<span>*</span>
|
||||
</label>
|
||||
<Selector
|
||||
id={"deepgram_stt_enpoint"}
|
||||
name={"deepgram_stt_enpoint"}
|
||||
value={deepgramSttUri}
|
||||
options={DEEPGRAM_STT_ENPOINT}
|
||||
onChange={(e) => {
|
||||
setDeepgramSttUri(e.target.value);
|
||||
setDeepgramSttUseTls(hasValue(e.target.value));
|
||||
}}
|
||||
/>
|
||||
</Checkzone>
|
||||
<Checkzone
|
||||
disabled={hasValue(credential)}
|
||||
|
||||
Reference in New Issue
Block a user