@adminforth/agent 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
:isRecording="microphoneButtonMode === 'listen'"
|
|
28
28
|
:amplitude="audioAmplitude"
|
|
29
29
|
/>
|
|
30
|
+
<Spinner v-if="isPolling" class="ml-2 w-4 h-4 text-lightButtonsText dark:text-darkButtonsText fill-lightButtonsBackground dark:fill-darkPrimary" />
|
|
30
31
|
</div>
|
|
31
32
|
<div v-else-if="microphoneButtonMode === 'generating'" class="flex items-center justify-center gap-2 text-white text-sm">
|
|
32
33
|
<span class="w-3 h-3 bg-white rounded-sm" />
|
|
@@ -65,6 +66,7 @@ const hideAnimationDebounced = debounce(() => {
|
|
|
65
66
|
const sendUserRecordDebounced = debounce(() => {
|
|
66
67
|
sendRecordForTranscription();
|
|
67
68
|
}, 500);
|
|
69
|
+
const isPolling = ref(false);
|
|
68
70
|
|
|
69
71
|
const isAudioChatMode = computed(() => agentStore.isAudioChatMode);
|
|
70
72
|
|
|
@@ -116,8 +118,10 @@ function toggleChatMode() {
|
|
|
116
118
|
}
|
|
117
119
|
|
|
118
120
|
async function onStartRecording() {
|
|
121
|
+
isPolling.value = true;
|
|
119
122
|
await unlockAudio();
|
|
120
123
|
await requestMicAndStartVAD(saidSomething, stopRecording, onAnySound);
|
|
124
|
+
isPolling.value = false;
|
|
121
125
|
microphoneButtonMode.value = 'listen';
|
|
122
126
|
agentAudio.playBeep(1000);
|
|
123
127
|
}
|