Node.js 从浏览器向nodejs服务器发送立体声音频流

Node.js 从浏览器向nodejs服务器发送立体声音频流,node.js,audio,socket.io,audio-streaming,web-audio-api,Node.js,Audio,Socket.io,Audio Streaming,Web Audio Api,我使用socket.io从每个音频通道发送原始PCM数据,如下所示: this.streamNode.onaudioprocess = (e) => { const leftChan = e.inputBuffer.getChannelData(0); const rightChan = e.inputBuffer.getChannelData(1); socket.emit('stream_rx_channel1', convertFloat32ToInt16(leftCha

我使用socket.io从每个音频通道发送原始PCM数据,如下所示:

this.streamNode.onaudioprocess = (e) => {
  const leftChan = e.inputBuffer.getChannelData(0);
  const rightChan = e.inputBuffer.getChannelData(1);
  socket.emit('stream_rx_channel1', convertFloat32ToInt16(leftChan));
  socket.emit('stream_rx_channel2', convertFloat32ToInt16(rightChan));
};
我正在使用Web Audio API和捕获来自每个通道的PCM数据,并将左、右通道数据分别发送到NodeJs服务器

然而,我需要知道一种方法,将这些流重新合并到NodeJs中,以创建一个立体声音频流,该音频流可以发送到谷歌的语音到文本服务。Google会自动转录音频流中的每个频道()。我需要这个,因为这个音频流中的左声道和右声道是两种不同的声音

我使用谷歌的实时语音到文本转录