From a8d28da221c1f1b9c0796bef2f08d521f0a663e4 Mon Sep 17 00:00:00 2001 From: EgleH Date: Fri, 3 Mar 2023 23:53:46 +0000 Subject: [PATCH] add soniox as speech provider (#211) Co-authored-by: EgleHelms --- src/containers/internal/views/applications/form.tsx | 5 ++++- src/containers/internal/views/speech-services/form.tsx | 9 ++++++--- src/vendor/index.tsx | 8 ++++++++ .../speech-recognizer/soniox-speech-recognizer-lang.ts | 10 ++++++++++ src/vendor/types.ts | 4 +++- 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 src/vendor/speech-recognizer/soniox-speech-recognizer-lang.ts diff --git a/src/containers/internal/views/applications/form.tsx b/src/containers/internal/views/applications/form.tsx index ce77146..01cb084 100644 --- a/src/containers/internal/views/applications/form.tsx +++ b/src/containers/internal/views/applications/form.tsx @@ -20,6 +20,7 @@ import { VENDOR_WELLSAID, useSpeechVendors, VENDOR_DEEPGRAM, + VENDOR_SONIOX, } from "src/vendor"; import { postApplication, @@ -382,7 +383,9 @@ export const ApplicationForm = ({ application }: ApplicationFormProps) => { name="synthesis_vendor" value={synthVendor} options={vendors.filter( - (vendor) => vendor.value != VENDOR_DEEPGRAM + (vendor) => + vendor.value != VENDOR_DEEPGRAM && + vendor.value != VENDOR_SONIOX )} onChange={(e) => { const vendor = e.target.value as keyof SynthesisVendors; diff --git a/src/containers/internal/views/speech-services/form.tsx b/src/containers/internal/views/speech-services/form.tsx index 3c881e6..84fc22b 100644 --- a/src/containers/internal/views/speech-services/form.tsx +++ b/src/containers/internal/views/speech-services/form.tsx @@ -27,6 +27,7 @@ import { VENDOR_DEEPGRAM, VENDOR_IBM, VENDOR_NVIDIA, + VENDOR_SONIOX, } from "src/vendor"; import { MSG_REQUIRED_FIELDS } from "src/constants"; import { @@ -173,7 +174,8 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { api_key: vendor === VENDOR_MICROSOFT || vendor === VENDOR_WELLSAID || - vendor === VENDOR_DEEPGRAM + vendor === VENDOR_DEEPGRAM || + vendor === VENDOR_SONIOX ? apiKey : null, client_id: vendor === VENDOR_NUANCE ? clientId : null, @@ -327,7 +329,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => { {vendor && (
- {vendor !== VENDOR_DEEPGRAM && ( + {vendor !== VENDOR_DEEPGRAM && vendor !== VENDOR_SONIOX && (