I have two node.js servers. I am trying to send an audio file from one server to another. I am converting the audio file to a stream and then sending it using socket.io-stream to the second server.
In my first server (audio file sender), I have the following code:
let stream = ss.createStream();
let inputStream = fs.createReadStream('output.wav')
inputStream.pipe(stream);
ss(socket).emit('finalAudioFile', stream);
In my second server(audio file receiver), I am having issues receiving the stream. I am actually able to pass an audio stream from the second server(audio file receiver) to the first(audio file sender), after which I need to send an audio file from the first server(audio file sender) to the second(audio file receiver), it's breaking. Basically, I need to be able to send streams back and forth. Can you please assist?
Hello,
I have two node.js servers. I am trying to send an audio file from one server to another. I am converting the audio file to a stream and then sending it using socket.io-stream to the second server.
In my first server (audio file sender), I have the following code: let stream = ss.createStream(); let inputStream = fs.createReadStream('output.wav') inputStream.pipe(stream); ss(socket).emit('finalAudioFile', stream);
In my second server(audio file receiver), I am having issues receiving the stream. I am actually able to pass an audio stream from the second server(audio file receiver) to the first(audio file sender), after which I need to send an audio file from the first server(audio file sender) to the second(audio file receiver), it's breaking. Basically, I need to be able to send streams back and forth. Can you please assist?