mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 23:56:39 +08:00
chore: wip
This commit is contained in:
parent
80a7a1d9d0
commit
43d38249d3
@ -575,16 +575,18 @@ export function ChatActions(props: {
|
|||||||
if (speechApi) {
|
if (speechApi) {
|
||||||
await speechApi.start();
|
await speechApi.start();
|
||||||
setIsListening(true);
|
setIsListening(true);
|
||||||
|
document.getElementById("chat-input")?.focus();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const stopListening = async () => {
|
const stopListening = async () => {
|
||||||
|
showToast(Locale.Chat.CloseSpeak);
|
||||||
if (speechApi) {
|
if (speechApi) {
|
||||||
if (config.sttConfig.engine !== DEFAULT_STT_ENGINE)
|
if (config.sttConfig.engine !== DEFAULT_STT_ENGINE)
|
||||||
setIsTranscription(true);
|
setIsTranscription(true);
|
||||||
await speechApi.stop();
|
await speechApi.stop();
|
||||||
setIsListening(false);
|
setIsListening(false);
|
||||||
}
|
}
|
||||||
showToast(Locale.Chat.CloseSpeak);
|
document.getElementById("chat-input")?.focus();
|
||||||
};
|
};
|
||||||
const onRecognitionEnd = (finalTranscript: string) => {
|
const onRecognitionEnd = (finalTranscript: string) => {
|
||||||
console.log(finalTranscript);
|
console.log(finalTranscript);
|
||||||
|
Loading…
Reference in New Issue
Block a user