mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-30 01:20:22 +09:00
follow the rabbit to fix potential issues
This commit is contained in:
parent
bcd50b89c8
commit
67192a7946
@ -31,8 +31,7 @@ export function TTSConfigList(props: {
|
|||||||
ttsPlayer.stop();
|
ttsPlayer.stop();
|
||||||
setSpeechStatus(false);
|
setSpeechStatus(false);
|
||||||
} else {
|
} else {
|
||||||
var api: ClientApi;
|
const api = new ClientApi(ModelProvider.GPT);
|
||||||
api = new ClientApi(ModelProvider.GPT);
|
|
||||||
const config = useAppConfig.getState();
|
const config = useAppConfig.getState();
|
||||||
setSpeechLoading(true);
|
setSpeechLoading(true);
|
||||||
ttsPlayer.init();
|
ttsPlayer.init();
|
||||||
@ -141,23 +140,25 @@ export function TTSConfigList(props: {
|
|||||||
: Locale.Chat.Actions.Speech
|
: Locale.Chat.Actions.Speech
|
||||||
}
|
}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
speechStatus
|
if (speechStatus) {
|
||||||
? (ttsPlayer.stop(), setSpeechStatus(false))
|
ttsPlayer.stop();
|
||||||
: openaiSpeech(
|
setSpeechStatus(false);
|
||||||
"NextChat,Unleash your imagination, experience the future of AI conversation.",
|
} else {
|
||||||
);
|
openaiSpeech(
|
||||||
|
"NextChat,Unleash your imagination, experience the future of AI conversation.",
|
||||||
|
);
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
value={props.ttsConfig.voice}
|
value={props.ttsConfig.voice}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
props.updateConfig(
|
props.updateConfig((config) => {
|
||||||
(config) =>
|
config.voice = TTSConfigValidator.voice(
|
||||||
(config.voice = TTSConfigValidator.voice(
|
e.currentTarget.value,
|
||||||
e.currentTarget.value,
|
);
|
||||||
)),
|
});
|
||||||
);
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{DEFAULT_TTS_VOICES.map((v, i) => (
|
{DEFAULT_TTS_VOICES.map((v, i) => (
|
||||||
|
Loading…
Reference in New Issue
Block a user