diff --git a/frontend/src/composables/useVoiceAudio.ts b/frontend/src/composables/useVoiceAudio.ts index be490f7..1e9945f 100644 --- a/frontend/src/composables/useVoiceAudio.ts +++ b/frontend/src/composables/useVoiceAudio.ts @@ -39,11 +39,14 @@ export function useVoiceAudio() { currentSource = source playing.value = true - source.onended = () => { - playing.value = false - currentSource = null - } - source.start(0) + return new Promise((resolve) => { + source.onended = () => { + playing.value = false + currentSource = null + resolve() + } + source.start(0) + }) } function stop(): void {