mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 09:50:15 +01:00
🗣️ feat: Language Support for OpenAI Speech-to-Text (#9470)
This commit is contained in:
parent
e95e0052da
commit
65c83317aa
2 changed files with 32 additions and 5 deletions
|
|
@ -25,6 +25,7 @@ const useSpeechToTextExternal = (
|
|||
|
||||
const [minDecibels] = useRecoilState(store.decibelValue);
|
||||
const [autoSendText] = useRecoilState(store.autoSendText);
|
||||
const [languageSTT] = useRecoilState<string>(store.languageSTT);
|
||||
const [speechToText] = useRecoilState<boolean>(store.speechToText);
|
||||
const [autoTranscribeAudio] = useRecoilState<boolean>(store.autoTranscribeAudio);
|
||||
|
||||
|
|
@ -121,6 +122,9 @@ const useSpeechToTextExternal = (
|
|||
|
||||
const formData = new FormData();
|
||||
formData.append('audio', audioBlob, `audio.${fileExtension}`);
|
||||
if (languageSTT) {
|
||||
formData.append('language', languageSTT);
|
||||
}
|
||||
setIsRequestBeingMade(true);
|
||||
cleanup();
|
||||
processAudio(formData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue