robinwood
v1.0.1
Published
Steal money from big companies
Maintainers
Readme
RobinWood
Steal money from big techs - they don't want you to save prompts. 🏴☠️
A pure JavaScript library to cut silence and speed up audio before sending to Whisper. Because paying for silence processing is for suckers.
🎯 Why RobinWood?
- Big Techs hate this: Reduces API costs by up to 70%
- Zero external dependencies: No need for the FFmpeg they want you to install
- Cross-platform: Works anywhere, even on that old server
🚀 Installation
npm install robinwoodYes, that's it. No 47 dependencies, no complex configurations.
💀 Usage
import RobinWood from "robinwood";
(async () => {
await RobinWood.Steal("input.wav", "output.wav", 1.25, 0.7);
console.log("Money saved! 🤑");
})();🔥 API
RobinWood.Steal(inputFile, outputFile, speed, temperature)
Processes an audio file by cutting silence and speeding up speech. Because time is money.
Parameters
inputFile(string): Path to input audio fileoutputFile(string): Path where the processed file will be savedspeed(number): Speed factor (e.g., 1.25 = 25% faster)- Must be between 0 and 4 (because more than that is crazy)
temperature(number): Silence cutting aggressiveness control (0-1)- 0.0 → very aggressive (threshold ~ -10 dB) - cuts even breathing
- 0.5 → moderate (threshold ~ -25 dB) - balanced
- 1.0 → gentle (threshold ~ -40 dB) - barely cuts anything
Returns
Promise<string>: Path to the final processed file
Silence Threshold Formula
silenceDb = -40 + (30 * (1 - temperature))Because math is beautiful, even when you don't understand it.
🎪 Examples
Basic Example (For Beginners)
import RobinWood from "robinwood";
(async () => {
try {
await RobinWood.Steal("my_audio.wav", "my_processed.wav", 1.25, 0.7);
console.log("Audio processed successfully! Now save on prompts!");
} catch (error) {
console.error("Error:", error.message);
}
})();Advanced Example (For Rebels)
import RobinWood from "robinwood";
async function processAudios() {
// Aggressive cutting + moderate speed - *for the brave*
await RobinWood.Steal("audio1.wav", "audio1_processed.wav", 1.5, 0.2);
// Gentle cutting + high speed - *for the conservatives*
await RobinWood.Steal("audio2.wav", "audio2_processed.wav", 2.0, 0.9);
// Moderate cutting + low speed - *for the indecisive*
await RobinWood.Steal("audio3.wav", "audio3_processed.wav", 1.1, 0.5);
}
processAudios().catch(console.error);⚡ Requirements
- Node.js >= 14.0.0
- No external dependencies! 🎉
Features
- ✅ Zero external dependencies - No FFmpeg, no problems
- ✅ Pure JavaScript implementation - Works everywhere
- ✅ Custom algorithms - Built from scratch
- ✅ Cross-platform - Works even on Windows (almost)
🧠 How It Works
Silence Detection: Custom algorithm that analyzes amplitude and detects silence periods based on temperature threshold.
Silence Removal: Removes detected periods while preserving audio quality.
Speed Processing: Uses linear interpolation to speed up audio while maintaining pitch.
Pure JavaScript: All processing is done in JavaScript without external dependencies.
Yes, it's simpler than you thought.
🏴☠️ Why "Steal"?
Because we're "stealing" money from big techs by optimizing audio before sending to their expensive APIs. It's a form of digital rebellion.
📈 Real Savings
- Before: 10 minutes of audio = $0.10 on Whisper
- After: 6 minutes of audio = $0.06 on Whisper
- Savings: $0.04 per file
Multiply that by thousands of files and you understand why big techs don't like this.
🤝 Contributing
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Because open source is a form of rebellion.
📄 License
MIT - Because freedom matters.
Remember: Big techs don't want you to save money. Use RobinWood and save anyway. 💪
