更语音静态资源

This commit is contained in:
yaooo 2023-10-12 16:42:40 +08:00
parent e670138ea7
commit 23d09c8e51
3 changed files with 6 additions and 2 deletions

View File

@ -82,6 +82,7 @@ console.log(text,'11111')
voice.start(); voice.start();
} }
} }
function addcloEvenPassthrough() { function addcloEvenPassthrough() {
window.closeEvent = function(info) { window.closeEvent = function(info) {
console.log('2222') console.log('2222')

View File

@ -5,7 +5,8 @@
} }
let transAudioData = { let transAudioData = {
transcode(audioData) { transcode(audioData) {
let output = transAudioData.to16kHz(audioData) let output = transAudioData.to16kHz(audioData)
output = transAudioData.to16BitPCM(output) output = transAudioData.to16BitPCM(output)
output = Array.from(new Uint8Array(output.buffer)) output = Array.from(new Uint8Array(output.buffer))
@ -41,5 +42,7 @@
} }
return dataView return dataView
} }
} }
})(); })();

View File

@ -266,7 +266,7 @@
} }
return false; return false;
}; };
console.log(this.audioData)
// 中间帧 // 中间帧
this.webSocket.send( this.webSocket.send(
JSON.stringify({ JSON.stringify({