mirror of
https://github.com/jambonz/jambonz-webapp.git
synced 2026-10-04 02:04:17 +00:00
@@ -3,6 +3,7 @@ import type {
|
|||||||
Currency,
|
Currency,
|
||||||
ElevenLabsOptions,
|
ElevenLabsOptions,
|
||||||
GoogleCustomVoice,
|
GoogleCustomVoice,
|
||||||
|
InworldOptions,
|
||||||
LimitField,
|
LimitField,
|
||||||
LimitUnitOption,
|
LimitUnitOption,
|
||||||
PasswordSettings,
|
PasswordSettings,
|
||||||
@@ -277,6 +278,14 @@ export const DEFAULT_RIMELABS_OPTIONS: Partial<RimelabsOptions> = {
|
|||||||
reduceLatency: true,
|
reduceLatency: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const DEFAULT_INWORLD_OPTIONS: Partial<InworldOptions> = {
|
||||||
|
audioConfig: {
|
||||||
|
pitch: 0.0,
|
||||||
|
speakingRate: 1.0,
|
||||||
|
},
|
||||||
|
temperature: 0.8,
|
||||||
|
};
|
||||||
|
|
||||||
// PlayHT options
|
// PlayHT options
|
||||||
export const DEFAULT_PLAYHT_OPTIONS: Partial<PlayHTOptions> = {
|
export const DEFAULT_PLAYHT_OPTIONS: Partial<PlayHTOptions> = {
|
||||||
quality: "medium",
|
quality: "medium",
|
||||||
|
|||||||
@@ -781,6 +781,16 @@ export interface RimelabsOptions {
|
|||||||
reduceLatency: boolean;
|
reduceLatency: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface InworldOptions {
|
||||||
|
audioConfig: {
|
||||||
|
bitRate?: number;
|
||||||
|
sampleRateHertz?: number;
|
||||||
|
pitch?: number;
|
||||||
|
speakingRate?: number;
|
||||||
|
};
|
||||||
|
temperature?: number;
|
||||||
|
}
|
||||||
|
|
||||||
export type CartesiaEmotions =
|
export type CartesiaEmotions =
|
||||||
| "anger:lowest"
|
| "anger:lowest"
|
||||||
| "anger:low"
|
| "anger:low"
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import {
|
|||||||
VENDOR_VOXIST,
|
VENDOR_VOXIST,
|
||||||
VENDOR_RIMELABS,
|
VENDOR_RIMELABS,
|
||||||
VENDOR_OPENAI,
|
VENDOR_OPENAI,
|
||||||
|
VENDOR_INWORLD,
|
||||||
} from "src/vendor";
|
} from "src/vendor";
|
||||||
import {
|
import {
|
||||||
LabelOptions,
|
LabelOptions,
|
||||||
@@ -312,6 +313,15 @@ export const SpeechProviderSelection = ({
|
|||||||
updateTtsVoice(newLang!.value, newLang!.voices[0].value);
|
updateTtsVoice(newLang!.value, newLang!.voices[0].value);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (synthVendor === VENDOR_INWORLD) {
|
||||||
|
let newLang = json.tts.find((lang) => lang.value === "en");
|
||||||
|
// If the new language doesn't map then default to the first one
|
||||||
|
if (!newLang) {
|
||||||
|
newLang = json.tts[0];
|
||||||
|
}
|
||||||
|
updateTtsVoice(newLang!.value, newLang!.voices[0].value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
/** Google and AWS have different language lists */
|
/** Google and AWS have different language lists */
|
||||||
/** If the new language doesn't map then default to "en-US" */
|
/** If the new language doesn't map then default to "en-US" */
|
||||||
let newLang = json.tts.find((lang) => lang.value === synthLang);
|
let newLang = json.tts.find((lang) => lang.value === synthLang);
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ import {
|
|||||||
VENDOR_CARTESIA,
|
VENDOR_CARTESIA,
|
||||||
VENDOR_VOXIST,
|
VENDOR_VOXIST,
|
||||||
VENDOR_OPENAI,
|
VENDOR_OPENAI,
|
||||||
|
VENDOR_INWORLD,
|
||||||
} from "src/vendor";
|
} from "src/vendor";
|
||||||
import { MSG_REQUIRED_FIELDS } from "src/constants";
|
import { MSG_REQUIRED_FIELDS } from "src/constants";
|
||||||
import {
|
import {
|
||||||
@@ -83,6 +84,7 @@ import {
|
|||||||
DEFAULT_CARTESIA_OPTIONS,
|
DEFAULT_CARTESIA_OPTIONS,
|
||||||
DEFAULT_ELEVENLABS_OPTIONS,
|
DEFAULT_ELEVENLABS_OPTIONS,
|
||||||
DEFAULT_GOOGLE_CUSTOM_VOICE,
|
DEFAULT_GOOGLE_CUSTOM_VOICE,
|
||||||
|
DEFAULT_INWORLD_OPTIONS,
|
||||||
DEFAULT_PLAYHT_OPTIONS,
|
DEFAULT_PLAYHT_OPTIONS,
|
||||||
DEFAULT_RIMELABS_OPTIONS,
|
DEFAULT_RIMELABS_OPTIONS,
|
||||||
DEFAULT_VERBIO_MODEL,
|
DEFAULT_VERBIO_MODEL,
|
||||||
@@ -233,6 +235,8 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
return DEFAULT_PLAYHT_OPTIONS;
|
return DEFAULT_PLAYHT_OPTIONS;
|
||||||
case VENDOR_RIMELABS:
|
case VENDOR_RIMELABS:
|
||||||
return DEFAULT_RIMELABS_OPTIONS;
|
return DEFAULT_RIMELABS_OPTIONS;
|
||||||
|
case VENDOR_INWORLD:
|
||||||
|
return DEFAULT_INWORLD_OPTIONS;
|
||||||
case VENDOR_CARTESIA:
|
case VENDOR_CARTESIA:
|
||||||
return DEFAULT_CARTESIA_OPTIONS;
|
return DEFAULT_CARTESIA_OPTIONS;
|
||||||
}
|
}
|
||||||
@@ -249,6 +253,8 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
return "https://docs.play.ht/reference/api-generate-tts-audio-stream";
|
return "https://docs.play.ht/reference/api-generate-tts-audio-stream";
|
||||||
case VENDOR_RIMELABS:
|
case VENDOR_RIMELABS:
|
||||||
return "https://rimelabs.mintlify.app/api-reference/endpoint/streaming-mp3#variable-parameters";
|
return "https://rimelabs.mintlify.app/api-reference/endpoint/streaming-mp3#variable-parameters";
|
||||||
|
case VENDOR_INWORLD:
|
||||||
|
return "https://docs.inworld.ai/api-reference/ttsAPI/texttospeech/synthesize-speech-stream";
|
||||||
case VENDOR_CARTESIA:
|
case VENDOR_CARTESIA:
|
||||||
return "https://docs.cartesia.ai/api-reference/tts/bytes";
|
return "https://docs.cartesia.ai/api-reference/tts/bytes";
|
||||||
}
|
}
|
||||||
@@ -432,11 +438,13 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
}),
|
}),
|
||||||
...((vendor === VENDOR_ELEVENLABS ||
|
...((vendor === VENDOR_ELEVENLABS ||
|
||||||
vendor === VENDOR_WHISPER ||
|
vendor === VENDOR_WHISPER ||
|
||||||
|
vendor === VENDOR_INWORLD ||
|
||||||
vendor === VENDOR_RIMELABS) && {
|
vendor === VENDOR_RIMELABS) && {
|
||||||
model_id: ttsModelId || null,
|
model_id: ttsModelId || null,
|
||||||
}),
|
}),
|
||||||
...((vendor === VENDOR_ELEVENLABS ||
|
...((vendor === VENDOR_ELEVENLABS ||
|
||||||
vendor === VENDOR_PLAYHT ||
|
vendor === VENDOR_PLAYHT ||
|
||||||
|
vendor === VENDOR_INWORLD ||
|
||||||
vendor === VENDOR_RIMELABS) && {
|
vendor === VENDOR_RIMELABS) && {
|
||||||
options: options || null,
|
options: options || null,
|
||||||
}),
|
}),
|
||||||
@@ -509,6 +517,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
vendor === VENDOR_ELEVENLABS ||
|
vendor === VENDOR_ELEVENLABS ||
|
||||||
vendor === VENDOR_PLAYHT ||
|
vendor === VENDOR_PLAYHT ||
|
||||||
vendor === VENDOR_RIMELABS ||
|
vendor === VENDOR_RIMELABS ||
|
||||||
|
vendor === VENDOR_INWORLD ||
|
||||||
vendor === VENDOR_WHISPER ||
|
vendor === VENDOR_WHISPER ||
|
||||||
vendor === VENDOR_CARTESIA ||
|
vendor === VENDOR_CARTESIA ||
|
||||||
vendor === VENDOR_OPENAI
|
vendor === VENDOR_OPENAI
|
||||||
@@ -578,6 +587,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
vendor === VENDOR_WHISPER ||
|
vendor === VENDOR_WHISPER ||
|
||||||
vendor === VENDOR_PLAYHT ||
|
vendor === VENDOR_PLAYHT ||
|
||||||
vendor === VENDOR_RIMELABS ||
|
vendor === VENDOR_RIMELABS ||
|
||||||
|
vendor === VENDOR_INWORLD ||
|
||||||
vendor === VENDOR_CARTESIA ||
|
vendor === VENDOR_CARTESIA ||
|
||||||
vendor === VENDOR_OPENAI ||
|
vendor === VENDOR_OPENAI ||
|
||||||
vendor === VENDOR_DEEPGRAM
|
vendor === VENDOR_DEEPGRAM
|
||||||
@@ -976,6 +986,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
vendor !== VENDOR_WHISPER &&
|
vendor !== VENDOR_WHISPER &&
|
||||||
vendor !== VENDOR_PLAYHT &&
|
vendor !== VENDOR_PLAYHT &&
|
||||||
vendor !== VENDOR_RIMELABS &&
|
vendor !== VENDOR_RIMELABS &&
|
||||||
|
vendor !== VENDOR_INWORLD &&
|
||||||
vendor !== VENDOR_ELEVENLABS && (
|
vendor !== VENDOR_ELEVENLABS && (
|
||||||
<label htmlFor="use_for_stt" className="chk">
|
<label htmlFor="use_for_stt" className="chk">
|
||||||
<input
|
<input
|
||||||
@@ -1705,6 +1716,7 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
vendor == VENDOR_ELEVENLABS ||
|
vendor == VENDOR_ELEVENLABS ||
|
||||||
vendor === VENDOR_WHISPER ||
|
vendor === VENDOR_WHISPER ||
|
||||||
vendor === VENDOR_RIMELABS ||
|
vendor === VENDOR_RIMELABS ||
|
||||||
|
vendor === VENDOR_INWORLD ||
|
||||||
vendor === VENDOR_SONIOX ||
|
vendor === VENDOR_SONIOX ||
|
||||||
vendor === VENDOR_CARTESIA ||
|
vendor === VENDOR_CARTESIA ||
|
||||||
vendor === VENDOR_OPENAI ||
|
vendor === VENDOR_OPENAI ||
|
||||||
@@ -1724,10 +1736,11 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
/>
|
/>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
)}
|
)}
|
||||||
{(vendor == VENDOR_ELEVENLABS ||
|
{(vendor === VENDOR_ELEVENLABS ||
|
||||||
vendor == VENDOR_WHISPER ||
|
vendor === VENDOR_WHISPER ||
|
||||||
vendor === VENDOR_PLAYHT ||
|
vendor === VENDOR_PLAYHT ||
|
||||||
vendor == VENDOR_RIMELABS ||
|
vendor === VENDOR_RIMELABS ||
|
||||||
|
vendor === VENDOR_INWORLD ||
|
||||||
(ttsCheck && vendor === VENDOR_CARTESIA)) &&
|
(ttsCheck && vendor === VENDOR_CARTESIA)) &&
|
||||||
ttsModels.length > 0 && (
|
ttsModels.length > 0 && (
|
||||||
<fieldset>
|
<fieldset>
|
||||||
@@ -1767,7 +1780,8 @@ export const SpeechServiceForm = ({ credential }: SpeechServiceFormProps) => {
|
|||||||
{(vendor === VENDOR_ELEVENLABS ||
|
{(vendor === VENDOR_ELEVENLABS ||
|
||||||
vendor === VENDOR_PLAYHT ||
|
vendor === VENDOR_PLAYHT ||
|
||||||
vendor === VENDOR_CARTESIA ||
|
vendor === VENDOR_CARTESIA ||
|
||||||
vendor === VENDOR_RIMELABS) && (
|
vendor === VENDOR_RIMELABS ||
|
||||||
|
vendor === VENDOR_INWORLD) && (
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<Checkzone
|
<Checkzone
|
||||||
hidden
|
hidden
|
||||||
|
|||||||
Vendored
+5
@@ -24,6 +24,7 @@ export const VENDOR_VOXIST = "voxist";
|
|||||||
export const VENDOR_WHISPER = "whisper";
|
export const VENDOR_WHISPER = "whisper";
|
||||||
export const VENDOR_PLAYHT = "playht";
|
export const VENDOR_PLAYHT = "playht";
|
||||||
export const VENDOR_RIMELABS = "rimelabs";
|
export const VENDOR_RIMELABS = "rimelabs";
|
||||||
|
export const VENDOR_INWORLD = "inworld";
|
||||||
export const VENDOR_VERBIO = "verbio";
|
export const VENDOR_VERBIO = "verbio";
|
||||||
export const VENDOR_CARTESIA = "cartesia";
|
export const VENDOR_CARTESIA = "cartesia";
|
||||||
export const VENDOR_OPENAI = "openai";
|
export const VENDOR_OPENAI = "openai";
|
||||||
@@ -101,6 +102,10 @@ export const vendors: VendorOptions[] = [
|
|||||||
name: "RimeLabs",
|
name: "RimeLabs",
|
||||||
value: VENDOR_RIMELABS,
|
value: VENDOR_RIMELABS,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Inworld",
|
||||||
|
value: VENDOR_INWORLD,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Verbio",
|
name: "Verbio",
|
||||||
value: VENDOR_VERBIO,
|
value: VENDOR_VERBIO,
|
||||||
|
|||||||
Vendored
+2
@@ -17,6 +17,7 @@ export type Vendor =
|
|||||||
| "whisper"
|
| "whisper"
|
||||||
| "playht"
|
| "playht"
|
||||||
| "rimelabs"
|
| "rimelabs"
|
||||||
|
| "inworld"
|
||||||
| "verbio"
|
| "verbio"
|
||||||
| "openai"
|
| "openai"
|
||||||
| "Cartesia";
|
| "Cartesia";
|
||||||
@@ -112,6 +113,7 @@ export interface SynthesisVendors {
|
|||||||
playht: VoiceLanguage[];
|
playht: VoiceLanguage[];
|
||||||
cartesia: VoiceLanguage[];
|
cartesia: VoiceLanguage[];
|
||||||
rimelabs: VoiceLanguage[];
|
rimelabs: VoiceLanguage[];
|
||||||
|
inworld: VoiceLanguage[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MSRawSpeech {
|
export interface MSRawSpeech {
|
||||||
|
|||||||
Reference in New Issue
Block a user