send float frames
This commit is contained in:
@@ -165,14 +165,7 @@ async function startRecord(option) {
|
|||||||
|
|
||||||
audioDataCache.push(inputData);
|
audioDataCache.push(inputData);
|
||||||
|
|
||||||
// feed inputs and run
|
socket.send(audioData16kHz);
|
||||||
const base64AudioData = btoa(String.fromCharCode.apply(null, new Uint8Array(audioData16kHz.buffer)));
|
|
||||||
|
|
||||||
socket.send(
|
|
||||||
JSON.stringify({
|
|
||||||
"audio": base64AudioData
|
|
||||||
})
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Prevent page mute
|
// Prevent page mute
|
||||||
|
|||||||
@@ -132,14 +132,7 @@ function startRecording(data) {
|
|||||||
|
|
||||||
audioDataCache.push(inputData);
|
audioDataCache.push(inputData);
|
||||||
|
|
||||||
// feed inputs and run
|
socket.send(audioData16kHz);
|
||||||
const base64AudioData = btoa(String.fromCharCode.apply(null, new Uint8Array(audioData16kHz.buffer)));
|
|
||||||
|
|
||||||
socket.send(
|
|
||||||
JSON.stringify({
|
|
||||||
"audio": base64AudioData
|
|
||||||
})
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Prevent page mute
|
// Prevent page mute
|
||||||
|
|||||||
Reference in New Issue
Block a user