mirror of
				https://github.com/Yidadaa/ChatGPT-Next-Web.git
				synced 2025-11-04 16:57:27 +08:00 
			
		
		
		
	fix: transcription headers
This commit is contained in:
		@@ -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();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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 />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user