mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20: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
|
|
@ -1,19 +1,25 @@
|
|||
import { useRecoilState } from 'recoil';
|
||||
import store from '~/store';
|
||||
|
||||
export enum AudioEndpoints {
|
||||
export enum STTEndpoints {
|
||||
browser = 'browser',
|
||||
external = 'external',
|
||||
}
|
||||
|
||||
export enum TTSEndpoints {
|
||||
browser = 'browser',
|
||||
edge = 'edge',
|
||||
external = 'external',
|
||||
}
|
||||
|
||||
const useGetAudioSettings = () => {
|
||||
const [engineSTT] = useRecoilState<string>(store.engineSTT);
|
||||
const [engineTTS] = useRecoilState<string>(store.engineTTS);
|
||||
|
||||
const externalSpeechToText = engineSTT === AudioEndpoints.external;
|
||||
const externalTextToSpeech = engineTTS === AudioEndpoints.external;
|
||||
const speechToTextEndpoint: STTEndpoints = engineSTT as STTEndpoints;
|
||||
const textToSpeechEndpoint: TTSEndpoints = engineTTS as TTSEndpoints;
|
||||
|
||||
return { externalSpeechToText, externalTextToSpeech };
|
||||
return { speechToTextEndpoint, textToSpeechEndpoint };
|
||||
};
|
||||
|
||||
export default useGetAudioSettings;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue