mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
Update SpeechRecognition.tsx
This commit is contained in:
parent
d405454bf5
commit
7f101bd122
1 changed files with 2 additions and 1 deletions
|
|
@ -32,6 +32,7 @@ const useSpeechRecognition = (ask) => {
|
||||||
|
|
||||||
if (result.isFinal) {
|
if (result.isFinal) {
|
||||||
setText(transcript);
|
setText(transcript);
|
||||||
|
//Enable below code to auto submit
|
||||||
//ask({ text: transcript });
|
//ask({ text: transcript });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -42,7 +43,7 @@ const useSpeechRecognition = (ask) => {
|
||||||
|
|
||||||
recognition.onend = () => {
|
recognition.onend = () => {
|
||||||
setIsListening(false);
|
setIsListening(false);
|
||||||
setText('');
|
// setText('');
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isListening) {
|
if (isListening) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue