Play the output audio instead of echoing the input
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Late Night Defender 2025-05-16 15:25:17 +07:00
parent 519c9d6fad
commit 15d88dfa25

View file

@ -71,7 +71,7 @@ function App() {
}) })
}); });
const outputAudioBlob = await speechRes.blob(); const outputAudioBlob = await speechRes.blob();
const audioUrl = URL.createObjectURL(audioBlob); const audioUrl = URL.createObjectURL(outputAudioBlob);
const audio = new Audio(audioUrl); const audio = new Audio(audioUrl);
audio.play(); audio.play();
}; };
@ -87,7 +87,7 @@ function App() {
if (mediaRecorderRef.current.stream) { if (mediaRecorderRef.current.stream) {
mediaRecorderRef.current.stream.getTracks().forEach(track => track.stop()); mediaRecorderRef.current.stream.getTracks().forEach(track => track.stop());
} }
setIsRecording(false); setIsRecording(false);
}; };