{ "info": { "author": "Shichao An", "author_email": "shichao.an@nyu.edu", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2" ], "description": "SoundMeter\n==========\n\n.. image:: https://img.shields.io/pypi/v/soundmeter.png\n :target: https://pypi.python.org/pypi/soundmeter\n\nSoundMeter is a command-line tool to obtain sound power in real time. It basically turns the audio recording functionality into a sound meter for machines that ship with audio input devices (e.g. microphone). It currently reveals the `root-mean-square (RMS) of sound fragments `_, which is a measure of the power in an audio signal. The actual values also depend on the system settings of sound input.\n\n.. image:: https://asciinema.org/a/RdNCvGdsdvxdu8O9nLqkhhgaT.png\n :target: https://asciinema.org/a/RdNCvGdsdvxdu8O9nLqkhhgaT\n\nFeatures\n--------\n\n- A command-line meter that supports triggering upon events\n- Monitor API for backend module programming\n\nDependencies\n------------\nSystem packages\n~~~~~~~~~~~~~~~\nOn Debian/Ubuntu::\n\n $ sudo apt-get install portaudio19-dev python-dev alsa-utils\n\nOn Fedora/RHEL::\n\n $ sudo yum install portaudio-devel python-devel alsa-utils\n\nOn OS X::\n\n $ brew install portaudio\n\nPyPI packages\n~~~~~~~~~~~~~\n- argparse\n- pyaudio\n- pydub\n- python-daemon\n\n\nInstallation\n------------\n\nYou can install the package with pip using the following command to allow externally hosted packages::\n\n $ pip install soundmeter --allow-all-external --allow-unverified pyaudio\n\nOr, you can download a source distribution and install with these commands::\n\n $ python setup.py install\n\n\nUsage\n-----\nThe simplest usage is to run \"soundmeter\" from command-line without any options::\n\n $ soundmeter\n\nCollect RMS values for 10 seconds so that you will know the sound level in the current environment::\n\n $ soundmeter --collect --seconds 10\n Collecting RMS values...\n 154 Timeout\n Collected result:\n min: 152\n max: 211\n avg: 156\n\nYou can set trigger and action for soundmeter.\n\nStop the soundmeter if RMS is greater than 211 consecutively for 3 times::\n\n $ soundmeter --trigger +211 3 --action stop\n\nExecute ``trigger.sh`` if RMS is greater than 211::\n\n $ soundmeter --trigger +211 --action exec --exec trigger.sh\n\nExecute ``trigger.sh`` and stop soundmeter if RMS is less than 152 consecutively for 3 times::\n\n $ soundmeter --trigger -152 3 --action exec-stop --exec trigger.sh\n\nRun the soundmeter with trigger and action in the background::\n\n $ soundmeter --trigger +211 3 --action exec --exec trigger.sh --daemonize\n\nRun the soundmeter for 2 minutes and log to ``meter.log``::\n\n $ soundmeter --seconds 120 --log meter.log\n\nCommand-line Options\n~~~~~~~~~~~~~~~~~~~~\n\nThe \"soundmeter\" command accepts the following options:\n\n -p PROFILE, --profile PROFILE config profile (section name)\n -c, --collect collect RMS values to determine thresholds\n -s SECS, --seconds SECS time in seconds to run the meter (default forever)\n -a ACTION_TYPE, --action ACTION_TYPE triggered action (``stop``, ``exec-stop`` and ``exec``)\n -t THRESHOLD, --trigger THRESHOLD trigger condition (threshold RMS and an optional number of consecutive triggering times, which defaults 1)\n -e FILE, --execute FILE shell script to execute upon trigger (defaults to ``~/.soundmeter/trigger.sh``), can be configured to pass the \"last triggering\" RMS value as argument by setting ``rms_as_trigger_arg`` to ``True`` in ~/.soundmeter/config\n -d, --daemonize run the meter in the background\n --log LOGFILE log the meter (defaults to ``~/.soundmeter/log``)\n -v, --verbose verbose mode\n --segment SECONDS audio segment length recorded in seconds (defaults to 0.5); when specified, it overrides ``audio_segment_length`` in ~/.soundmeter/config\n\nConfig\n~~~~~~\nSome \"dependency-required\" parameters can be configured at ~/.soundmeter/config. The default configuration is::\n\n [soundmeter]\n frames_per_buffer = 2048\n format = 8\n channels = 2\n rate = 44100\n audio_segment_length = 0.5\n rms_as_trigger_arg = False\n\nYou can have multiple sections in the config file and specify the one to use with the ``--profile`` command-line options. The default profile name is ``soundmeter``. For example::\n\n [soundmeter]\n frames_per_buffer = 2048\n format = 8\n channels = 2\n\n [test]\n frames_per_buffer = 1024\n format = 8\n channels = 1\n\nTo use the ``test`` profile::\n\n $ soundmeter --profile test ...\n\nThere is also an ``input_device_index`` parameter, which specifies the index of input device to use. If unspecified, it uses the default input device.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/shichao-an/soundmeter", "keywords": "soundmeter", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "soundmeter", "package_url": "https://pypi.org/project/soundmeter/", "platform": "", "project_url": "https://pypi.org/project/soundmeter/", "project_urls": { "Homepage": "https://github.com/shichao-an/soundmeter" }, "release_url": "https://pypi.org/project/soundmeter/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "Simple real-time sound meter.", "version": "0.1.5" }, "last_serial": 4091435, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "2a34726beb9c7a2d4c3922d9391595d8", "sha256": "a3b66c2ec7d49e17a22562be81ebf0304a7a1da202c34ca9712e17ef97023a53" }, "downloads": -1, "filename": "soundmeter-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2a34726beb9c7a2d4c3922d9391595d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9832, "upload_time": "2014-01-06T08:01:20", "url": "https://files.pythonhosted.org/packages/d9/01/5fe8fc6531bdae683db71224e44980ee8244f250fb44012ae7b53a535754/soundmeter-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d336d402cc302e660cdeb6abe924d0e3", "sha256": "1b2c2a8b20ea6d3718277562759cf2581c69de7cbc041157acb3f7fe8c6f6bf2" }, "downloads": -1, "filename": "soundmeter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d336d402cc302e660cdeb6abe924d0e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9876, "upload_time": "2014-01-06T08:36:36", "url": "https://files.pythonhosted.org/packages/11/14/b6d0543da75ef176b454d0d66a91a41ab410ee472fc6c4f85e26ee2d9193/soundmeter-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "552afe97327f5a6b78880af75f89cacc", "sha256": "762df3d3c8973b7a28f652a990951b0d2eb5b5657f8814cc938b016d2a94298e" }, "downloads": -1, "filename": "soundmeter-0.1.2.tar.gz", "has_sig": false, "md5_digest": "552afe97327f5a6b78880af75f89cacc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10540, "upload_time": "2014-01-10T01:30:25", "url": "https://files.pythonhosted.org/packages/cf/45/de5fc8212390b9a3c2e14c30d975220a7db8684a55160085d6cf4233f0c9/soundmeter-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "91d80e0a8691dbdcaa5307e740d9c55f", "sha256": "e39d5d525d663847a09afce50a91f6672013c2df70ff679c2e7c299df357b17f" }, "downloads": -1, "filename": "soundmeter-0.1.3.tar.gz", "has_sig": false, "md5_digest": "91d80e0a8691dbdcaa5307e740d9c55f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11201, "upload_time": "2016-01-10T03:14:09", "url": "https://files.pythonhosted.org/packages/c6/a9/9b3200e1fd1fb30ea10423017a35c2195699e6b3da39e6ccbfa7cbefc144/soundmeter-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "f7f7c68c4c2b6996f12005e008eff26f", "sha256": "ff70542e16bcbb294be71e4587d4a3306354ca7c3abd0888ab50e88953c953b7" }, "downloads": -1, "filename": "soundmeter-0.1.4.tar.gz", "has_sig": false, "md5_digest": "f7f7c68c4c2b6996f12005e008eff26f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10125, "upload_time": "2018-03-14T04:57:11", "url": "https://files.pythonhosted.org/packages/cd/5d/859d924d53ad90744c9d70c0d132ccacb2cea006c621c68ef7548e55939b/soundmeter-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "1f38f48ae0b48dc6ff97d91ef46cea0c", "sha256": "235111fb462e1da90797a06f303fba7189b0c8c00f872aa8f8e5385ebbd4000e" }, "downloads": -1, "filename": "soundmeter-0.1.5.tar.gz", "has_sig": false, "md5_digest": "1f38f48ae0b48dc6ff97d91ef46cea0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10432, "upload_time": "2018-07-23T01:56:40", "url": "https://files.pythonhosted.org/packages/bf/e4/05ca77956cfd3946892843d4477a7dcb6e8d826e90bf8c272b66fb7f2684/soundmeter-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1f38f48ae0b48dc6ff97d91ef46cea0c", "sha256": "235111fb462e1da90797a06f303fba7189b0c8c00f872aa8f8e5385ebbd4000e" }, "downloads": -1, "filename": "soundmeter-0.1.5.tar.gz", "has_sig": false, "md5_digest": "1f38f48ae0b48dc6ff97d91ef46cea0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10432, "upload_time": "2018-07-23T01:56:40", "url": "https://files.pythonhosted.org/packages/bf/e4/05ca77956cfd3946892843d4477a7dcb6e8d826e90bf8c272b66fb7f2684/soundmeter-0.1.5.tar.gz" } ] }