I have node.js installed and running on Android in termux. Though, ultimately I want this to run in javascript in the chrome browser. I have the following working via the termux command line:
This records (using sox) from the phone's mic until it hears silence, then pipes the resulting .wav stream to an IP cammera where it is played (spoken) through the camer's speaker (eg, at the front door).
This is intended to happen when a button is pressed in Home Assistant (eg, in the chrome browser). Since browsers cannot run shell commands, and because I want it to be as responsive as possible, I would like to accomplish the same thing in javascript.
I am hopeful that sox-audio is the correct/best module to use for this. If not, suggestions are welcome, please.
Can anyone help me understand how to do this (what additional packages to use, and maybe some example code)?
I have node.js installed and running on Android in termux. Though, ultimately I want this to run in javascript in the chrome browser. I have the following working via the termux command line:
This records (using sox) from the phone's mic until it hears silence, then pipes the resulting .wav stream to an IP cammera where it is played (spoken) through the camer's speaker (eg, at the front door).
This is intended to happen when a button is pressed in Home Assistant (eg, in the chrome browser). Since browsers cannot run shell commands, and because I want it to be as responsive as possible, I would like to accomplish the same thing in javascript.
I am hopeful that sox-audio is the correct/best module to use for this. If not, suggestions are welcome, please.
Can anyone help me understand how to do this (what additional packages to use, and maybe some example code)?