[Refactor] Change the function names.

This commit is contained in:
Sakamoto Shiina
2024-09-10 21:11:15 +09:00
parent b4d164e116
commit e1d8f59890
45 changed files with 230 additions and 191 deletions

View File

@@ -1,9 +1,9 @@
import { useSpeakerThreshold as useStoreSpeakerThreshold } from "@store";
import { useStore_SpeakerThreshold } from "@store";
import { useStdoutToPython } from "@logics/useStdoutToPython";
export const useSpeakerThreshold = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { updateSpeakerThreshold, currentSpeakerThreshold } = useStoreSpeakerThreshold();
const { updateSpeakerThreshold, currentSpeakerThreshold } = useStore_SpeakerThreshold();
const getSpeakerThreshold = () => {
asyncStdoutToPython("/config/input_speaker_energy_threshold");
@@ -13,5 +13,10 @@ export const useSpeakerThreshold = () => {
asyncStdoutToPython("/controller/callback_set_speaker_energy_threshold", speaker_threshold);
};
return { getSpeakerThreshold, setSpeakerThreshold, currentSpeakerThreshold, updateSpeakerThreshold };
return {
currentSpeakerThreshold,
getSpeakerThreshold,
setSpeakerThreshold,
updateSpeakerThreshold,
};
};