Update asr.js

This commit is contained in:
Harvey Zack committed 2025-05-23 14:28:42 +08:00
1 parent 15067279e3
commit b2f88cdd94
1 file changed
+2 -1
+2 -1
View File
@@ -40,10 +40,11 @@ async function startAsr(buffer) {
ws = new WebSocket(url);
ws.binaryType = 'arraybuffer';
ws.onmessage = (event) => {
const { code, result } = JSON.parse(event.data);
const { code, result, message } = JSON.parse(event.data);
if (code === 0) {
art.plugins.artplayerPluginAsr.append(result?.voice_text_str);
} else {
console.error(code, message);
stopAsr();
}
};