Reputation: 58
I am creating a smart hotline which the callers will communicate with an AI voice bot. It's a web application based on WebRTC.
However, I'm struggling to connect the audio input and output between the client and the bot.
So far, my idea is to rewire the input and output device by the getUserMedia()
and setSinkId()
functions. But I don't know how to turn my bot into a "device" so that I could connect it to the application.
I use puppeteer to automate the process
Upvotes: 1
Views: 849
Reputation: 1469
You can use Virtual Audio Cable. You can send the audio from the bot to the VAC speaker and it will relay the sound to a virtual microphone. Then you can select the microphone with getUserMedia.
edit:
You can also use jackaudio which is available crossplatform.
Upvotes: 1