New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cosplay-pi-tk-voice-modulator

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cosplay-pi-tk-voice-modulator - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

27

dist/main.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const child_process_1 = require("child_process");
const path = require("path");
const tk_voice_modulator_settings_1 = require("./tk-voice-modulator-settings");

@@ -26,3 +27,9 @@ const init = async () => {

];
let isMicOn = false;
let lastOnTime = new Date();
let wasClickPlayed = true;
const startSox = () => {
isMicOn = false;
lastOnTime = new Date();
wasClickPlayed = true;
let soxInputProcess = (0, child_process_1.spawn)(`nice -n 8 sox -d -t wav --buffer ${tk_voice_modulator_settings_1.tkVoiceModulatorEffectiveSettings.bufferSize} - ${recArgs.join(` `)}`, {

@@ -38,3 +45,5 @@ shell: true,

soxOutputProcess.stdout.pipe(process.stdout);
soxOutputProcess.stderr.on(`data`, () => {
soxOutputProcess.stderr.on(`data`, (chunk) => {
const strChunk = String(chunk);
isMicOn = strChunk.includes(`=`);
});

@@ -71,4 +80,20 @@ const onSoxTerminated = async () => {

startSox();
setInterval(() => {
const now = new Date();
if (isMicOn) {
wasClickPlayed = false;
lastOnTime = now;
}
else {
if (!wasClickPlayed) {
if (now.getTime() - lastOnTime.getTime() > 600) {
const clickPlaySoundFilePath = path.resolve(__dirname, `..`, `click.wav`);
(0, child_process_1.exec)(`play ${clickPlaySoundFilePath} gain -20`);
wasClickPlayed = true;
}
}
}
}, 50);
};
init();
//# sourceMappingURL=main.js.map

2

package.json
{
"name": "cosplay-pi-tk-voice-modulator",
"version": "1.1.1",
"version": "1.1.2",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc