Compare commits

...

2 Commits

Author SHA1 Message Date
Quan HL
0c4eca378c feat assembly ai 2023-11-01 13:28:50 +07:00
Quan HL
3f4879094f feat assembly ai 2023-11-01 13:28:43 +07:00
4 changed files with 41 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ import {
VENDOR_CUSTOM,
VENDOR_COBALT,
VENDOR_ELEVENLABS,
VENDOR_ASSEMBLYAI,
} from "src/vendor";
import { MSG_REQUIRED_FIELDS } from "src/constants";
import {
@@ -313,6 +314,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
vendor === VENDOR_MICROSOFT ||
vendor === VENDOR_WELLSAID ||
vendor === VENDOR_DEEPGRAM ||
vendor === VENDOR_ASSEMBLYAI ||
vendor === VENDOR_SONIOX ||
vendor === VENDOR_ELEVENLABS
? apiKey
@@ -603,6 +605,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
{vendor && (
<fieldset>
{vendor !== VENDOR_DEEPGRAM &&
vendor !== VENDOR_ASSEMBLYAI &&
vendor !== VENDOR_COBALT &&
vendor !== VENDOR_SONIOX &&
vendor != VENDOR_CUSTOM && (
@@ -1062,6 +1065,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
)}
{(vendor === VENDOR_WELLSAID ||
vendor === VENDOR_DEEPGRAM ||
vendor === VENDOR_ASSEMBLYAI ||
vendor == VENDOR_ELEVENLABS ||
vendor === VENDOR_SONIOX) && (
<fieldset>

View File

@@ -23,6 +23,7 @@ export const VENDOR_SONIOX = "soniox";
export const VENDOR_CUSTOM = "custom";
export const VENDOR_COBALT = "cobalt";
export const VENDOR_ELEVENLABS = "elevenlabs";
export const VENDOR_ASSEMBLYAI = "assemblyai";
export const vendors: VendorOptions[] = [
{
@@ -73,6 +74,10 @@ export const vendors: VendorOptions[] = [
name: "ElevenLabs",
value: VENDOR_ELEVENLABS,
},
{
name: "AssemblyAI",
value: VENDOR_ASSEMBLYAI,
},
].sort((a, b) => a.name.localeCompare(b.name)) as VendorOptions[];
export const useRegionVendors = () => {
@@ -128,6 +133,7 @@ export const useSpeechVendors = () => {
import("./speech-recognizer/nvidia-speech-recognizer-lang"),
import("./speech-recognizer/soniox-speech-recognizer-lang"),
import("./speech-recognizer/cobalt-speech-recognizer-lang"),
import("./speech-recognizer/assemblyai-speech-recognizer-lang"),
import("./speech-synthesis/aws-speech-synthesis-lang"),
import("./speech-synthesis/google-speech-synthesis-lang"),
import("./speech-synthesis/ms-speech-synthesis-lang"),
@@ -147,6 +153,7 @@ export const useSpeechVendors = () => {
{ default: nvidiaRecognizer },
{ default: sonioxRecognizer },
{ default: cobaltRecognizer },
{ default: assemblyaiRecognizer },
{ default: awsSynthesis },
{ default: googleSynthesis },
{ default: msSynthesis },
@@ -178,6 +185,7 @@ export const useSpeechVendors = () => {
nvidia: nvidiaRecognizer,
soniox: sonioxRecognizer,
cobalt: cobaltRecognizer,
assemblyai: assemblyaiRecognizer,
},
});
}

View File

@@ -0,0 +1,26 @@
import type { Language } from "../types";
export const languages: Language[] = [
{ name: "Global English", code: "en" },
{ name: "Australian English", code: "en_au" },
{ name: "British English", code: "en_uk" },
{ name: "US English", code: "en_us" },
{ name: "Spanish", code: "es" },
{ name: "French", code: "fr" },
{ name: "German", code: "de" },
{ name: "Italian", code: "it" },
{ name: "Portuguese", code: "pt" },
{ name: "Dutch", code: "nl" },
{ name: "Hindi", code: "hi" },
{ name: "Japanese", code: "ja" },
{ name: "Chinese", code: "zh" },
{ name: "Finnish", code: "fi" },
{ name: "Korean", code: "ko" },
{ name: "Polish", code: "pl" },
{ name: "Russian", code: "ru" },
{ name: "Turkish", code: "tr" },
{ name: "Ukrainian", code: "uk" },
{ name: "Vietnamese", code: "vi" },
];
export default languages;

4
src/vendor/types.ts vendored
View File

@@ -10,7 +10,8 @@ export type Vendor =
| "Soniox"
| "Cobalt"
| "Custom"
| "ElevenLabs";
| "ElevenLabs"
| "assemblyai";
export interface VendorOptions {
name: Vendor;
@@ -73,6 +74,7 @@ export interface RecognizerVendors {
nvidia: Language[];
soniox: Language[];
cobalt: Language[];
assemblyai: Language[];
}
export interface SynthesisVendors {