support soundhound stt (#567)

* support houndify stt

* wip

* wip
This commit is contained in:
Hoan Luu Huu
2025-10-14 11:52:06 +07:00
committed by GitHub
parent a70a1bf614
commit 6aae8d9930
5 changed files with 62 additions and 1 deletions

View File

@@ -419,6 +419,7 @@ export interface SpeechCredential {
custom_stt_endpoint: null | string;
client_id: null | string;
client_secret: null | string;
client_key: null | string;
secret: null | string;
nuance_tts_uri: null | string;
nuance_stt_uri: null | string;

View File

@@ -38,6 +38,7 @@ import {
VENDOR_INWORLD,
VENDOR_DEEPGRAM_FLUX,
VENDOR_RESEMBLE,
VENDOR_HOUNDIFY,
} from "src/vendor";
import {
LabelOptions,
@@ -434,6 +435,7 @@ export const SpeechProviderSelection = ({
vendor.value !== VENDOR_CUSTOM &&
vendor.value !== VENDOR_OPENAI &&
vendor.value !== VENDOR_DEEPGRAM_FLUX &&
vendor.value !== VENDOR_HOUNDIFY &&
vendor.value !== VENDOR_COBALT,
)}
onChange={(e) => {

View File

@@ -55,6 +55,7 @@ import {
VENDOR_INWORLD,
VENDOR_DEEPGRAM_FLUX,
VENDOR_RESEMBLE,
VENDOR_HOUNDIFY,
} from "src/vendor";
import { MSG_REQUIRED_FIELDS } from "src/constants";
import {
@@ -134,6 +135,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
const [secretAccessKey, setSecretAccessKey] = useState("");
const [clientId, setClientId] = useState("");
const [secretKey, setSecretKey] = useState("");
const [clientKey, setClientKey] = useState("");
const [clientSecret, setClientSecret] = useState("");
const [googleServiceKey, setGoogleServiceKey] =
useState<GoogleServiceKey | null>(null);
@@ -455,6 +457,11 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
nuance_tts_uri: onPremNuanceTtsUrl || null,
nuance_stt_uri: onPremNuanceSttUrl || null,
}),
...(vendor === VENDOR_HOUNDIFY && {
client_id: clientId || null,
client_key: clientKey || null,
user_id: userId || null,
}),
...(vendor === VENDOR_COBALT && {
cobalt_server_uri: cobaltServerUri || null,
}),
@@ -723,6 +730,9 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
if (credential.data.client_id) {
setClientId(credential.data.client_id);
}
if (credential.data.client_key) {
setClientKey(credential.data.client_key);
}
if (credential.data.secret) {
setSecretKey(credential.data.secret);
@@ -1028,6 +1038,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
vendor !== VENDOR_SONIOX &&
vendor !== VENDOR_SPEECHMATICS &&
vendor !== VENDOR_DEEPGRAM_FLUX &&
vendor !== VENDOR_HOUNDIFY &&
vendor !== VENDOR_OPENAI &&
vendor != VENDOR_CUSTOM && (
<label htmlFor="use_for_tts" className="chk">
@@ -1427,6 +1438,47 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
)}
</>
)}
{vendor === VENDOR_HOUNDIFY && (
<fieldset>
<label htmlFor="houndify_client_id">
Client ID
{!onPremNuanceSttCheck && !onPremNuanceTtsCheck && <span>*</span>}
</label>
<input
id="houndify_client_id"
required={!onPremNuanceSttCheck && !onPremNuanceTtsCheck}
type="text"
name="houndify_client_id"
placeholder="Client ID"
value={clientId}
onChange={(e) => setClientId(e.target.value)}
disabled={credential ? true : false}
/>
<label htmlFor="houndify_secret">
Client Key
{!onPremNuanceSttCheck && !onPremNuanceTtsCheck && <span>*</span>}
</label>
<Passwd
id="houndify_secret"
required={!onPremNuanceSttCheck && !onPremNuanceTtsCheck}
name="houndify_secret"
placeholder="Client Key"
value={clientKey ? getObscuredSecret(clientKey) : clientKey}
onChange={(e) => setClientKey(e.target.value)}
disabled={credential ? true : false}
/>
<label htmlFor="houndify_user_id">User ID</label>
<input
id="houndify_user_id"
type="text"
name="houndify_user_id"
placeholder="User ID"
value={userId}
onChange={(e) => setUserId(e.target.value)}
disabled={credential ? true : false}
/>
</fieldset>
)}
{vendor === VENDOR_NUANCE && (
<>
<fieldset>

View File

@@ -30,6 +30,7 @@ export const VENDOR_VERBIO = "verbio";
export const VENDOR_CARTESIA = "cartesia";
export const VENDOR_OPENAI = "openai";
export const VENDOR_RESEMBLE = "resemble";
export const VENDOR_HOUNDIFY = "houndify";
export const vendors: VendorOptions[] = [
{
@@ -128,6 +129,10 @@ export const vendors: VendorOptions[] = [
name: "Resemble",
value: VENDOR_RESEMBLE,
},
{
name: "SoundHound",
value: VENDOR_HOUNDIFY,
},
].sort((a, b) => a.name.localeCompare(b.name)) as VendorOptions[];
export const AWS_CREDENTIAL_ACCESS_KEY = "access_key";

3
src/vendor/types.ts vendored
View File

@@ -22,7 +22,8 @@ export type Vendor =
| "verbio"
| "openai"
| "Cartesia"
| "Resemble";
| "Resemble"
| "Houndify";
export interface VendorOptions {
name: Vendor;