👍️[Update] Mainl: endpointの命名規則を修正

This commit is contained in:
misyaguziya
2024-09-24 11:51:57 +09:00
parent 80b57612bc
commit e129fd308b
24 changed files with 462 additions and 460 deletions

View File

@@ -7,24 +7,24 @@ export const useSpeakerThreshold = () => {
const { updateEnableAutomaticSpeakerThreshold, currentEnableAutomaticSpeakerThreshold, pendingEnableAutomaticSpeakerThreshold } = useStore_EnableAutomaticSpeakerThreshold();
const getSpeakerThreshold = () => {
asyncStdoutToPython("/get/speaker_energy_threshold");
asyncStdoutToPython("/get/data/speaker_energy_threshold");
};
const setSpeakerThreshold = (speaker_threshold) => {
asyncStdoutToPython("/set/speaker_energy_threshold", speaker_threshold);
asyncStdoutToPython("/set/data/speaker_energy_threshold", speaker_threshold);
};
const getEnableAutomaticSpeakerThreshold = () => {
pendingEnableAutomaticSpeakerThreshold();
asyncStdoutToPython("/get/speaker_dynamic_energy_threshold");
asyncStdoutToPython("/get/data/speaker_automatic_threshold");
};
const toggleEnableAutomaticSpeakerThreshold = () => {
pendingEnableAutomaticSpeakerThreshold();
if (currentEnableAutomaticSpeakerThreshold.data) {
asyncStdoutToPython("/set/disable_speaker_dynamic_energy_threshold");
asyncStdoutToPython("/set/disable/speaker_automatic_threshold");
} else {
asyncStdoutToPython("/set/enable_speaker_dynamic_energy_threshold");
asyncStdoutToPython("/set/enable/speaker_automatic_threshold");
}
};