mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2025-12-19 05:37:43 +00:00
support gladia stt (#572)
This commit is contained in:
@@ -56,6 +56,7 @@ import {
|
|||||||
VENDOR_DEEPGRAM_FLUX,
|
VENDOR_DEEPGRAM_FLUX,
|
||||||
VENDOR_RESEMBLE,
|
VENDOR_RESEMBLE,
|
||||||
VENDOR_HOUNDIFY,
|
VENDOR_HOUNDIFY,
|
||||||
|
VENDOR_GLADIA,
|
||||||
} from "src/vendor";
|
} from "src/vendor";
|
||||||
import { MSG_REQUIRED_FIELDS } from "src/constants";
|
import { MSG_REQUIRED_FIELDS } from "src/constants";
|
||||||
import {
|
import {
|
||||||
@@ -510,6 +511,10 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
resemble_tts_uri: resembleTtsUri || null,
|
resemble_tts_uri: resembleTtsUri || null,
|
||||||
resemble_tts_use_tls: resembleTtsUseTls ? 1 : 0,
|
resemble_tts_use_tls: resembleTtsUseTls ? 1 : 0,
|
||||||
}),
|
}),
|
||||||
|
...(vendor === VENDOR_GLADIA && {
|
||||||
|
api_key: apiKey || null,
|
||||||
|
region: region || null,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (credential && credential.data) {
|
if (credential && credential.data) {
|
||||||
@@ -561,7 +566,8 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
vendor === VENDOR_CARTESIA ||
|
vendor === VENDOR_CARTESIA ||
|
||||||
vendor === VENDOR_OPENAI ||
|
vendor === VENDOR_OPENAI ||
|
||||||
vendor === VENDOR_RESEMBLE ||
|
vendor === VENDOR_RESEMBLE ||
|
||||||
vendor === VENDOR_DEEPGRAM_FLUX
|
vendor === VENDOR_DEEPGRAM_FLUX ||
|
||||||
|
vendor === VENDOR_GLADIA
|
||||||
? apiKey
|
? apiKey
|
||||||
: null,
|
: null,
|
||||||
}),
|
}),
|
||||||
@@ -1040,6 +1046,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
vendor !== VENDOR_DEEPGRAM_FLUX &&
|
vendor !== VENDOR_DEEPGRAM_FLUX &&
|
||||||
vendor !== VENDOR_HOUNDIFY &&
|
vendor !== VENDOR_HOUNDIFY &&
|
||||||
vendor !== VENDOR_OPENAI &&
|
vendor !== VENDOR_OPENAI &&
|
||||||
|
vendor !== VENDOR_GLADIA &&
|
||||||
vendor != VENDOR_CUSTOM && (
|
vendor != VENDOR_CUSTOM && (
|
||||||
<label htmlFor="use_for_tts" className="chk">
|
<label htmlFor="use_for_tts" className="chk">
|
||||||
<input
|
<input
|
||||||
@@ -1929,7 +1936,8 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
vendor === VENDOR_OPENAI ||
|
vendor === VENDOR_OPENAI ||
|
||||||
vendor === VENDOR_DEEPGRAM_FLUX ||
|
vendor === VENDOR_DEEPGRAM_FLUX ||
|
||||||
vendor === VENDOR_RESEMBLE ||
|
vendor === VENDOR_RESEMBLE ||
|
||||||
vendor === VENDOR_SPEECHMATICS) && (
|
vendor === VENDOR_SPEECHMATICS ||
|
||||||
|
vendor === VENDOR_GLADIA) && (
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<label htmlFor={`${vendor}_apikey`}>
|
<label htmlFor={`${vendor}_apikey`}>
|
||||||
API key<span>*</span>
|
API key<span>*</span>
|
||||||
|
|||||||
8
src/vendor/index.tsx
vendored
8
src/vendor/index.tsx
vendored
@@ -31,6 +31,7 @@ export const VENDOR_CARTESIA = "cartesia";
|
|||||||
export const VENDOR_OPENAI = "openai";
|
export const VENDOR_OPENAI = "openai";
|
||||||
export const VENDOR_RESEMBLE = "resemble";
|
export const VENDOR_RESEMBLE = "resemble";
|
||||||
export const VENDOR_HOUNDIFY = "houndify";
|
export const VENDOR_HOUNDIFY = "houndify";
|
||||||
|
export const VENDOR_GLADIA = "gladia";
|
||||||
|
|
||||||
export const vendors: VendorOptions[] = [
|
export const vendors: VendorOptions[] = [
|
||||||
{
|
{
|
||||||
@@ -133,6 +134,10 @@ export const vendors: VendorOptions[] = [
|
|||||||
name: "SoundHound",
|
name: "SoundHound",
|
||||||
value: VENDOR_HOUNDIFY,
|
value: VENDOR_HOUNDIFY,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Gladia",
|
||||||
|
value: VENDOR_GLADIA,
|
||||||
|
},
|
||||||
].sort((a, b) => a.name.localeCompare(b.name)) as VendorOptions[];
|
].sort((a, b) => a.name.localeCompare(b.name)) as VendorOptions[];
|
||||||
|
|
||||||
export const AWS_CREDENTIAL_ACCESS_KEY = "access_key";
|
export const AWS_CREDENTIAL_ACCESS_KEY = "access_key";
|
||||||
@@ -165,12 +170,14 @@ export const useRegionVendors = () => {
|
|||||||
import("./regions/ms-azure-regions"),
|
import("./regions/ms-azure-regions"),
|
||||||
import("./regions/ibm-regions"),
|
import("./regions/ibm-regions"),
|
||||||
import("./regions/speechmatics-regions"),
|
import("./regions/speechmatics-regions"),
|
||||||
|
import("./regions/gladia-regions"),
|
||||||
]).then(
|
]).then(
|
||||||
([
|
([
|
||||||
{ default: awsRegions },
|
{ default: awsRegions },
|
||||||
{ default: msRegions },
|
{ default: msRegions },
|
||||||
{ default: ibmRegions },
|
{ default: ibmRegions },
|
||||||
{ default: speechmaticsRegions },
|
{ default: speechmaticsRegions },
|
||||||
|
{ default: gladiaRegions },
|
||||||
]) => {
|
]) => {
|
||||||
if (!ignore) {
|
if (!ignore) {
|
||||||
setRegions({
|
setRegions({
|
||||||
@@ -178,6 +185,7 @@ export const useRegionVendors = () => {
|
|||||||
microsoft: msRegions,
|
microsoft: msRegions,
|
||||||
ibm: ibmRegions,
|
ibm: ibmRegions,
|
||||||
speechmatics: speechmaticsRegions,
|
speechmatics: speechmaticsRegions,
|
||||||
|
gladia: gladiaRegions,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
14
src/vendor/regions/gladia-regions.ts
vendored
Normal file
14
src/vendor/regions/gladia-regions.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import type { Region } from "../types";
|
||||||
|
|
||||||
|
export const regions: Region[] = [
|
||||||
|
{
|
||||||
|
name: "US West",
|
||||||
|
value: "us-west",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "EU West",
|
||||||
|
value: "eu-west",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default regions;
|
||||||
4
src/vendor/types.ts
vendored
4
src/vendor/types.ts
vendored
@@ -23,7 +23,8 @@ export type Vendor =
|
|||||||
| "openai"
|
| "openai"
|
||||||
| "Cartesia"
|
| "Cartesia"
|
||||||
| "Resemble"
|
| "Resemble"
|
||||||
| "Houndify";
|
| "Houndify"
|
||||||
|
| "gladia";
|
||||||
|
|
||||||
export interface VendorOptions {
|
export interface VendorOptions {
|
||||||
name: Vendor;
|
name: Vendor;
|
||||||
@@ -85,6 +86,7 @@ export interface RegionVendors {
|
|||||||
microsoft: Region[];
|
microsoft: Region[];
|
||||||
ibm: Region[];
|
ibm: Region[];
|
||||||
speechmatics: Region[];
|
speechmatics: Region[];
|
||||||
|
gladia: Region[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TtsModels {
|
export interface TtsModels {
|
||||||
|
|||||||
Reference in New Issue
Block a user