File size: 521 Bytes
f0743f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 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;
|