GithubHelp home page GithubHelp logo

keep-speaker-awake's Introduction

keep-speaker-awake

Overview

This PowerShell script is designed to keep your speakers active by playing a silent sound file at regular intervals. This is particularly useful for speakers that automatically enter sleep mode after a period of inactivity, potentially causing you to miss important notifications like calls.

Motivation

Many speakers prioritize battery life by turning off after a predetermined time of silence. While this is a power-saving feature, it can be inconvenient if you rely on your speakers for infrequent but crucial alerts like incoming calls. This script addresses this by playing a silent sound file periodically, preventing the speaker from entering sleep mode and ensuring you don't miss notifications.

How it Works

Adjustable Delay: The script allows you to customize the time between silent sound playback by modifying the $delayInMinute variable at the beginning. The default value is set to 5 minutes. Silent Sound Playback: The script utilizes a silent WAV file named silent.wav located in the same directory as the script (.). You'll need to create this WAV file beforehand using an audio editing tool. Continuous Loop: The script employs a while loop to continuously play the silent sound file at the specified interval until manually stopped.

Benefits

Prevents speakers from entering sleep mode due to inactivity. Ensures you receive important notifications like calls, even if they occur infrequently. Customizable delay to match your needs.

Run the Script

Open PowerShell in the directory containing the script (keep-speaker-awake.ps1) and execute it using the ./keep-speaker-awake.ps1 command

Stopping the Script

To stop the script from repeatedly playing the sound and potentially exit PowerShell, press Ctrl + C simultaneously.

Disclaimer

This script is provided as-is without warranty. While the script plays a silent sound, extremely sensitive individuals might perceive a faint clicking or popping noise depending on their speaker setup. Consider alternative approaches like adjusting your speaker's sleep timer settings if available (consult your speaker's manual).

Additional Notes

For advanced users, you can combine it with the windows scheduler to launch the script when your computer turn on.

keep-speaker-awake's People

Contributors

dipandaaser avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.