diff --git a/src/api/types.ts b/src/api/types.ts index 69a1d40..095db78 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -423,6 +423,7 @@ export interface SpeechCredential { auth_token: null | string; custom_stt_url: null | string; custom_tts_url: null | string; + custom_tts_streaming_url: null | string; label: null | string; cobalt_server_uri: null | string; model_id: null | string; diff --git a/src/containers/internal/views/speech-services/form.tsx b/src/containers/internal/views/speech-services/form.tsx index b09078a..68fa40f 100644 --- a/src/containers/internal/views/speech-services/form.tsx +++ b/src/containers/internal/views/speech-services/form.tsx @@ -145,6 +145,10 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { const [tmpCustomVendorTtsUrl, setTmpCustomVendorTtsUrl] = useState(""); const [customVendorTtsUrl, setCustomVendorTtsUrl] = useState(""); const [tmpCustomVendorSttUrl, setTmpCustomVendorSttUrl] = useState(""); + const [customVendorTtsStreamingUrl, setCustomVendorTtsStreamingUrl] = + useState(""); + const [tmpCustomVendorTtsStreamingUrl, setTmpCustomVendorTtsStreamingUrl] = + useState(""); const [customVendorSttUrl, setCustomVendorSttUrl] = useState(""); const [initialOnPremNuanceTtsCheck, setInitialOnPremNuanceTtsCheck] = useState(false); @@ -379,6 +383,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { use_for_tts: ttsCheck ? 1 : 0, use_for_stt: sttCheck ? 1 : 0, custom_tts_url: customVendorTtsUrl || null, + custom_tts_streaming_url: customVendorTtsStreamingUrl || null, custom_stt_url: customVendorSttUrl || null, auth_token: customVendorAuthToken || null, }), @@ -685,6 +690,12 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { setTmpCustomVendorSttUrl(credential.data.custom_stt_url || ""); setCustomVendorTtsUrl(credential.data.custom_tts_url || ""); setTmpCustomVendorTtsUrl(credential.data.custom_tts_url || ""); + setCustomVendorTtsStreamingUrl( + credential.data.custom_tts_streaming_url || "", + ); + setTmpCustomVendorTtsStreamingUrl( + credential.data.custom_tts_streaming_url || "", + ); if (credential.data.label) { setLabel(credential.data.label); } @@ -914,26 +925,47 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { setTtsCheck(e.target.checked); if (!e.target.checked) { setTmpCustomVendorTtsUrl(customVendorTtsUrl); + setTmpCustomVendorTtsStreamingUrl( + customVendorTtsStreamingUrl, + ); setCustomVendorTtsUrl(""); + setCustomVendorTtsStreamingUrl(""); } else { setCustomVendorTtsUrl(tmpCustomVendorTtsUrl); + setCustomVendorTtsStreamingUrl( + tmpCustomVendorTtsStreamingUrl, + ); } }} > { setCustomVendorTtsUrl(e.target.value); }} /> + + { + setCustomVendorTtsStreamingUrl(e.target.value); + }} + />