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.0.0 to 1.1.0

click.wav

51

dist/main.js

@@ -6,2 +6,4 @@ "use strict";

const init = async () => {
console.log(`This module uses these sounds from freesound:`);
console.log(`- "radio click 7.wav" by ERH ( https://freesound.org/people/ERH/sounds/30331/ ) licensed under CCBY 4.0`);
const recArgs = [

@@ -28,20 +30,47 @@ `--buffer`,

];
let soxProcess;
const startSoxProcess = () => {
soxProcess = (0, child_process_1.spawn)(`nice -n 8 play "|rec ${recArgs.join(` `)}"`, {
const startSox = () => {
let soxInputProcess = (0, child_process_1.spawn)(`nice -n 8 sox -d -t wav - ${recArgs.join(` `)}`, {
shell: true,
stdio: `inherit`,
});
soxProcess.on(`exit`, async () => {
await new Promise((resolvePromise) => setTimeout(resolvePromise, 1000));
startSoxProcess();
let soxOutputProcess = (0, child_process_1.spawn)(`play -t wav -`, {
shell: true,
});
soxProcess.on(`error`, async () => {
soxInputProcess.stdout.pipe(soxOutputProcess.stdin);
soxInputProcess.stderr.on(`data`, () => {
});
soxOutputProcess.stdout.pipe(process.stdout);
soxOutputProcess.stderr.on(`data`, () => {
});
const onSoxTerminated = async () => {
await new Promise((resolvePromise) => setTimeout(resolvePromise, 1000));
startSoxProcess();
});
if (soxInputProcess !== undefined) {
try {
soxInputProcess.kill();
}
catch (_a) {
}
finally {
soxInputProcess = undefined;
}
}
if (soxOutputProcess !== undefined) {
try {
soxOutputProcess.kill();
}
catch (_b) {
}
finally {
soxOutputProcess = undefined;
}
}
startSox();
};
soxInputProcess.on(`exit`, onSoxTerminated);
soxInputProcess.on(`error`, onSoxTerminated);
soxOutputProcess.on(`exit`, onSoxTerminated);
soxOutputProcess.on(`error`, onSoxTerminated);
};
startSoxProcess();
startSox();
};
init();
//# sourceMappingURL=main.js.map
{
"name": "cosplay-pi-tk-voice-modulator",
"version": "1.0.0",
"version": "1.1.0",
"main": "dist/index.js",
"files": [
"dist",
"click.wav",
"default-settings.json"

@@ -8,0 +9,0 @@ ],

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