🗣️ feat: Language Support for OpenAI Speech-to-Text (#9470)

This commit is contained in:
Danny Avila 2025-09-05 12:01:00 -04:00 committed by GitHub
parent e95e0052da
commit 65c83317aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 32 additions and 5 deletions

View file

@ -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);