Skip to content

Commit 06c1cc8

Browse files
committed
fix: add debug logs for the play audio[2]
1 parent a4a20bb commit 06c1cc8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

custom/composables/agentAudio/utils.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ export async function unlockAudio() {
4040

4141
export async function startStandByAudio() {
4242
console.log('Starting standby audio');
43-
const response = await fetch(
44-
loadFile('plugins/AdminForthAgentPlugin/agentAudio/agent-processing.mp3')
45-
);
43+
const filePath = 'plugins/AdminForthAgentPlugin/agentAudio/agent-processing.mp3';
44+
const fileUrl = await loadFile(filePath);
45+
console.log('Standby audio file URL:', fileUrl);
46+
const response = await fetch(fileUrl);
4647
console.log('Standby audio file loaded:, response:', response);
4748
const arrayBuffer = await response.arrayBuffer();
4849
const audioBuffer = await ctx.decodeAudioData(arrayBuffer);

0 commit comments

Comments
 (0)