
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@deskthing/microphone
Advanced tools
A simple microphone daemon and websocket wrapper for streaming audio chunks to and from the Car Thing. Some ADB configuration is required as well as access to SupervisorCTL.
A lightweight NPM package for configuring and utilizing a microphone on the Car Thing device or other websites.
To install the package, run:
npm install @deskthing/microphone
After installation, configure the daemon on your Car Thing device. This can be accomplished by executing the install script from @deskthing/microphone/utils. Ensure that ADB is installed and available in your system's PATH. If ADB is already in your PATH, you may omit the adbPath option.
import { install, InstallConfig } from '@deskthing/microphone/utils';
const config: InstallConfig = {
adbPath: 'C:/path/to/adb.exe',
clientId: 'ADBclientIdString'
};
const loggingCallback = (message: string) => {
console.log(message);
};
install(config, loggingCallback);
Note:
It is recommended to run this script as part of apostinstall.jsprocess to automate Car Thing configuration after package installation.
- If
adbPathis omitted, the program will attempt to use the system environment variables.- If
clientIdis omitted, the default ADB device will be used. This may fail if multiple clients are connected.
Below are basic usage examples for the @deskthing/microphone package.
import { audioManager, MicConfig } from '@deskthing/microphone';
const micConfig: MicConfig = {
sampleRate: 16000,
channelCount: 1,
bytesPerSample: 2,
secondsPerChunk: 1,
};
// Configure the microphone
audioManager.configureMic(micConfig);
// Start capturing audio
audioManager.openMic();
// Stop capturing audio
audioManager.closeMic();
Audio packets are provided as ArrayBuffer objects. The first 44 bytes contain WAV headers with channel, rate, and other metadata.
audioManager.onAudioPacket((packet: ArrayBuffer) => {
// Handle the raw audio packet (e.g., send to server, analyze, etc.)
console.log('Received audio packet:', packet);
});
audioManager.onMicStateChange((state) => {
console.log('Mic state changed:', state);
});
This may be necessary for debugging purposes.
await audioManager.retryBackend();
These examples demonstrate how to configure the microphone, manage audio capture, and listen for audio data or state changes. For advanced usage, refer to the API documentation or review the source code.
This project uses a CI workflow to build artifacts and publish the package to npm when a GitHub release matching the package version is created.
# Bump patch / minor / major version
npm version patch -m "Release v%s"
git push origin main
git push --tags
FAQs
A simple microphone daemon and websocket wrapper for streaming audio chunks to and from the Car Thing. Some ADB configuration is required as well as access to SupervisorCTL.
The npm package @deskthing/microphone receives a total of 12 weekly downloads. As such, @deskthing/microphone popularity was classified as not popular.
We found that @deskthing/microphone demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.