bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/audio/audio-graphql/hooks/useSetSpeechOptions.ts
Lucas 9bf3f54183
feat: Initial BBB 3.0 Gladia transcriptions implementation (#20295)
* feat(html5): initial implementation of Gladia transcriptions to BBB 3.0

* fix(transcription): Add missing locales and fix invalid cc menu key

* fix(bbb-transcription-controller): Bump transcription controller to fix some bugs

* fix: adjust yq syntax for setting fs esl password in transctiption-controller

* fix(transcription): Use newer useSettings format from transcription options

* fix(captions): Correctly use captions settings

---------

Co-authored-by: João Victor <joaovictornunes973@gmail.com>
Co-authored-by: Anton Georgiev <anto.georgiev@gmail.com>
Co-authored-by: Ramón Souza <contato@ramonsouza.com>
2024-06-12 12:06:07 -04:00

24 lines
578 B
TypeScript

import { useCallback } from 'react';
import { useMutation } from '@apollo/client';
import { USER_SET_SPEECH_OPTIONS } from '../mutations';
const useSetSpeechOptions = () => {
const [userSetSpeechOptions] = useMutation(USER_SET_SPEECH_OPTIONS);
const setSpeechOptions = (
partialUtterances: boolean,
minUtteranceLength: number,
) => {
userSetSpeechOptions({
variables: {
partialUtterances,
minUtteranceLength,
},
});
};
return useCallback(setSpeechOptions, [userSetSpeechOptions]);
};
export default useSetSpeechOptions;