Merge branch 'main' into re-add-download-audio

This commit is contained in:
Marco Beretta 2024-07-17 18:38:28 +02:00 committed by GitHub
commit 511f1336da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
81 changed files with 2193 additions and 1416 deletions

View file

@ -10,7 +10,7 @@ const useSpeechToTextExternal = (onTranscriptionComplete: (text: string) => void
const { externalSpeechToText } = useGetAudioSettings();
const [speechToText] = useRecoilState<boolean>(store.speechToText);
const [autoTranscribeAudio] = useRecoilState<boolean>(store.autoTranscribeAudio);
const [autoSendText] = useRecoilState<boolean>(store.autoSendText);
const [autoSendText] = useRecoilState(store.autoSendText);
const [text, setText] = useState<string>('');
const [isListening, setIsListening] = useState(false);
const [permission, setPermission] = useState(false);
@ -27,10 +27,11 @@ const useSpeechToTextExternal = (onTranscriptionComplete: (text: string) => void
const extractedText = data.text;
setText(extractedText);
setIsRequestBeingMade(false);
if (autoSendText && speechToText && extractedText.length > 0) {
if (autoSendText > -1 && speechToText && extractedText.length > 0) {
setTimeout(() => {
onTranscriptionComplete(extractedText);
}, 3000);
}, autoSendText * 1000);
}
},
onError: () => {

View file

@ -112,7 +112,7 @@ export default function useTextarea({
? getAssistantName({ name: assistantName, localize })
: getSender(conversation as TEndpointOption);
return `${localize('com_endpoint_message')} ${sender ? sender : 'ChatGPT'}`;
return `${localize('com_endpoint_message')} ${sender ? sender : 'AI'}`;
};
const placeholder = getPlaceholderText();