Skip to the content.

Spatial Microphone

This is a “virtual microphone” that runs on the command line. Drop the Spatial Microphone in a High Fidelity Spatial Audio Space to record the audio in that Space from coordinates (0, 0, 0). The Spatial Microphone saves audio recordings in .wav format by default. Developers can change that with a quick source code update such that the Microphone records in .mp3 format. Audio output files are saved to disk in the output directory.

Spatial Microphone works out-of-the-box with the Spatial Speaker Space Experiment, as displayed in the screenshot below.

"Spatial Microphone" Example Screenshot

Author

Zach Fox

Usage

  1. Install NodeJS v14.15.x
  2. Run npm install
  3. Copy auth.example.json to auth.json.
  4. Populate your credentials inside ./auth.json.
  5. Run npm run start

Starting and Stopping Recording using the Spatial Microphone REST API

Make an HTTP GET request to http://localhost:8124/spatial-microphone/<request>, replacing <request> with one of the options below:

The server will respond to each of the above requests with JSON.

Programmatically Starting and Stopping Recording with Spatial Speaker Space

  1. Start up the Spatial Speaker Space Experiment using the instructions found underneath that Experiment.
  2. Start up Spatial Microphone using the Usage instructions above, ensuring that the Space to which the Microphone connects matches the Spatial Speaker Space to which you are connecting in your browser.
  3. Connect to the Spatial Speaker Space using your browser.
  4. You should see the Spatial Microphone in the center of the virtual space. Click the Participants Floating Action Button in the bottom right, then click on the Spatial Mic’s display name in the list to start recording. Click the Spatial Mic’s display name again to stop recording.