mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-11 01:10:11 +01:00
update STT/TTS option dropdowns
This commit is contained in:
parent
e9e4ffb838
commit
275be6a0f3
@ -84,6 +84,7 @@ function ElevenLabsModelSelection({ apiKey, settings }) {
|
||||
<select
|
||||
name="TTSElevenLabsVoiceModel"
|
||||
required={true}
|
||||
defaultValue={settings?.TTSElevenLabsVoiceModel}
|
||||
className="bg-zinc-900 border-gray-500 text-white text-sm rounded-lg block w-full p-2.5"
|
||||
>
|
||||
{Object.keys(groupedModels)
|
||||
@ -91,11 +92,7 @@ function ElevenLabsModelSelection({ apiKey, settings }) {
|
||||
.map((organization) => (
|
||||
<optgroup key={organization} label={organization}>
|
||||
{groupedModels[organization].map((model) => (
|
||||
<option
|
||||
key={model.id}
|
||||
value={model.id}
|
||||
selected={settings?.OpenAiModelPref === model.id}
|
||||
>
|
||||
<option key={model.id} value={model.id}>
|
||||
{model.name}
|
||||
</option>
|
||||
))}
|
||||
|
@ -35,7 +35,11 @@ export default function OpenAiTextToSpeechOptions({ settings }) {
|
||||
>
|
||||
{["alloy", "echo", "fable", "onyx", "nova", "shimmer"].map(
|
||||
(voice) => {
|
||||
return <option value={voice}>{toProperCase(voice)}</option>;
|
||||
return (
|
||||
<option key={voice} value={voice}>
|
||||
{toProperCase(voice)}
|
||||
</option>
|
||||
);
|
||||
}
|
||||
)}
|
||||
</select>
|
||||
|
@ -47,7 +47,7 @@ export default function TextToSpeechProvider({ settings }) {
|
||||
const searchInputRef = useRef(null);
|
||||
|
||||
const handleSubmit = async (e) => {
|
||||
e.preventDefault();
|
||||
e?.preventDefault();
|
||||
const form = e.target;
|
||||
const data = { TextToSpeechProvider: selectedProvider };
|
||||
const formData = new FormData(form);
|
||||
@ -110,10 +110,7 @@ export default function TextToSpeechProvider({ settings }) {
|
||||
</div>
|
||||
<div className="w-full justify-end flex">
|
||||
{hasChanges && (
|
||||
<CTAButton
|
||||
onClick={() => handleSubmit()}
|
||||
className="mt-3 mr-0 -mb-14 z-10"
|
||||
>
|
||||
<CTAButton className="mt-3 mr-0 -mb-14 z-10">
|
||||
{saving ? "Saving..." : "Save changes"}
|
||||
</CTAButton>
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user