mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
🗣️ feat: Edge TTS engine (#3358)
* feat: MS Edge TTS * feat: Edge TTS; fix: STT hook
This commit is contained in:
parent
01a88991ab
commit
b390ba781f
14 changed files with 379 additions and 129 deletions
|
|
@ -9,7 +9,8 @@ const useSpeechToTextBrowser = () => {
|
|||
const { showToast } = useToastContext();
|
||||
const [languageSTT] = useRecoilState<string>(store.languageSTT);
|
||||
const [autoTranscribeAudio] = useRecoilState<boolean>(store.autoTranscribeAudio);
|
||||
const { externalSpeechToText } = useGetAudioSettings();
|
||||
const { speechToTextEndpoint } = useGetAudioSettings();
|
||||
const isBrowserSTTEnabled = speechToTextEndpoint === 'browser';
|
||||
const [isListening, setIsListening] = useState(false);
|
||||
|
||||
const {
|
||||
|
|
@ -51,7 +52,7 @@ const useSpeechToTextBrowser = () => {
|
|||
|
||||
useEffect(() => {
|
||||
const handleKeyDown = (e: KeyboardEvent) => {
|
||||
if (e.shiftKey && e.altKey && e.code === 'KeyL' && !externalSpeechToText) {
|
||||
if (e.shiftKey && e.altKey && e.code === 'KeyL' && !isBrowserSTTEnabled) {
|
||||
toggleListening();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue