fix: transcription headers

This commit is contained in:
DDMeaqua 2024-08-28 13:13:41 +08:00
parent d8b1781d7b
commit 318e0989a2
3 changed files with 10 additions and 7 deletions

View File

@ -220,13 +220,16 @@ export function validString(x: string): boolean {
return x?.length > 0; return x?.length > 0;
} }
export function getHeaders() { export function getHeaders(ignoreHeaders?: boolean) {
const accessStore = useAccessStore.getState(); const accessStore = useAccessStore.getState();
const chatStore = useChatStore.getState(); const chatStore = useChatStore.getState();
const headers: Record<string, string> = { let headers: Record<string, string> = {};
"Content-Type": "application/json", if (!ignoreHeaders) {
Accept: "application/json", headers = {
}; "Content-Type": "application/json",
Accept: "application/json",
};
}
const clientConfig = getClientConfig(); const clientConfig = getClientConfig();

View File

@ -1686,7 +1686,6 @@ function _Chat() {
? Locale.Chat.Actions.StopSpeech ? Locale.Chat.Actions.StopSpeech
: Locale.Chat.Actions.Speech : Locale.Chat.Actions.Speech
} }
loding={speechLoading}
icon={ icon={
speechStatus ? ( speechStatus ? (
<SpeakStopIcon /> <SpeakStopIcon />

View File

@ -1,4 +1,4 @@
import { PluginConfig, TTSConfig, TTSConfigValidator } from "../store"; import { TTSConfig, TTSConfigValidator } from "../store";
import Locale from "../locales"; import Locale from "../locales";
import { ListItem, Select } from "./ui-lib"; import { ListItem, Select } from "./ui-lib";
@ -111,6 +111,7 @@ export function TTSConfigList(props: {
subTitle={Locale.Settings.TTS.Speed.SubTitle} subTitle={Locale.Settings.TTS.Speed.SubTitle}
> >
<InputRange <InputRange
aria={Locale.Settings.TTS.Speed.Title}
value={props.ttsConfig.speed?.toFixed(1)} value={props.ttsConfig.speed?.toFixed(1)}
min="0.3" min="0.3"
max="4.0" max="4.0"