chat / client /src /hooks /Input /useGetAudioSettings.ts
helloya20's picture
Upload 2345 files
f0743f4 verified
import { useMemo } from 'react';
import { useRecoilValue } from 'recoil';
import store from '~/store';
const useGetAudioSettings = () => {
const engineSTT = useRecoilValue<string>(store.engineSTT);
const engineTTS = useRecoilValue<string>(store.engineTTS);
const speechToTextEndpoint = engineSTT;
const textToSpeechEndpoint = engineTTS;
return useMemo(
() => ({ speechToTextEndpoint, textToSpeechEndpoint }),
[speechToTextEndpoint, textToSpeechEndpoint],
);
};
export default useGetAudioSettings;