muttr


Namemuttr JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/kuralabs/muttr
SummaryMuttr. Mute all inputs, or change audio outputs and inputs easily.
upload_time2023-04-01 09:51:16
maintainer
docs_urlNone
authorKuraLabs S.R.L
requires_python
license
keywords muttr
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =====
Muttr
=====

.. image:: https://img.shields.io/pypi/v/muttr
   :target: https://pypi.org/project/muttr/
   :alt: PyPI

.. image:: https://img.shields.io/github/license/kuralabs/muttr
   :target: https://choosealicense.com/licenses/apache-2.0/
   :alt: License

*Mute all inputs, or change audio outputs and inputs easily.*

.. image:: ./muttr.png
   :height: 250px

So, you're in a meeting a need to mute yourself (all microphones!),
independently of the application you're running? Done.

You're done with your meeting, you put your headset down and want to listen to
music in a different audio output? Done.

Your colleague said, hey, can we do a quick meeting? Angrily, you pause your
music and grab your headset. Do I need to change the audio input and output
back to my headset? Yes? Done.

**So, what's Muttr?**

Muttr is a tool specially made for COVID-19 pandemic working from home people.

It allows to:

- Mute all sources (microphones) at the same time, in case the application is
  getting audio from a different source of the one you think its on.

  *Am I muted? Am I muted? Yes, you are!*

- To mute independently of the application you're running (Slack, Zoom, Teams)
  because it mutes the sound server from the operating system (PulseAudio).

  *What was the hotkey for Slack? Oh wait that's the hotkey for Teams! Where*
  *is that damn mute button and why it is so small and hidden and dark?*

- To change between audio profiles, for example, to quickly change to your
  headset before a meeting, and then change back to your speakers to listen
  music.

  *Yay meeting is no more, music fun times, oh wait forget about it.*


Muttr uses PulseAudio API to do all of this, so it is supported in operating
systems that use PulseAudio to control the audio devices. For example, Ubuntu,
and many other Linux based operating systems.

With Muttr you can configure audio profiles, that is, what audio devices,
their inputs and outputs (sources and sinks, in PulseAudio terminology) you
want to use at a determined point in time.

You can mute, unmute, or swap between those audio profiles using the CLI. Or
you can assign a key combination, start the Muttr daemon and perform those
actions using your keyboard. This is great when using macropads!


Install
=======

.. code-block:: sh

    $ sudo pip3 install muttr
    $ muttr --version


Getting Started
===============

Mute and unmute
---------------

::

    $ muttr mute
    $ muttr unmute

The above will mute and unmute all audio sources in the system.

If for any reason there is the need to restrict the audio sources to mute the
following configuration entry may be used:

::

    [muttr.muter]
    sources = ["first_source", "second_source"]

Create a ``config.toml`` with the above entry and run Muttr with:

::

    $ muttr -c config.toml mute
    $ muttr -c config.toml unmute

Use the following command to identify which sources are available in your
system:

::

    $ muttr show


Create and change audio profiles
--------------------------------

First, connect all your devices (Bluetooth headsets, for example), and run:

::

    $ muttr show

A complete tree of your audio system will print.

Create a file ``config.toml`` and fill the profiles you need like this:

::

    [muttr.changer.options.meeting]
    card_profile = [
        "bluez_card.20_74_CF_92_CD_06",
        "Headset Head Unit (HSP/HFP)",
    ]
    source = "OpenComm by Shokz"
    sink = "OpenComm by Shokz"

    [muttr.changer.options.music]
    card_profile = [
        "bluez_card.20_74_CF_92_CD_06",
        "Headset Head Unit (HSP/HFP)",
    ]
    sink = "M-Track 2X2M Digital Stereo (IEC958)"

    [muttr.changer.options.game]
    source = "SteelSeries Arctis 7 Analog Mono"
    sink = "SteelSeries Arctis 7 Analog Stereo"


In this example, the system will have 3 profiles:

#. One for meetings, using a lightweight Bluetooth bone conductor headset.
   Not the best sound, but is good for voices and is the most comfortable for
   those long meetings.
#. One for listening music, using an external interface connected to some
   great monitor speakers.
#. One for gaming, a large over-ear headphones, awesome sound.
   Perfect for immersive experiences.

Once ready, change between audio profiles using:

::

    $ muttr -c config.toml change music
    $ muttr -c config.toml change meeting
    $ muttr -c config.toml change game

As noted, at least a sink or a source needs to be declared. In many situations
there may be the need to change the profile the card associated with the source
or sink is using. In those situations, use the ``card_profile`` and specify
which card and card profile to use when changing to that audio profile.


Enable system wide mode and hotkeys
-----------------------------------

To enable kotkeys to change mute/unmute and change between audio profiles run
Muttr as a daemon:

::

    $ muttr -c config.toml daemon

By default, the following hotkeys are supported:

::

    [muttr.daemon]
    hotkey_mute = "<ctrl>+<alt>+m"
    hotkey_unmute = "<ctrl>+<alt>+u"
    hotkey_mute_toggle = "<cmd_l>+<alt>+m"
    hotkey_change_cycle = "<cmd_l>+<alt>+c"

:hotkey_mute: Mute all sources.
:hotkey_unmute: Unmute all sources.
:hotkey_mute_toggle: Toggle between mute and unmute all sources.
:hotkey_change_cycle: Change / cycle between all configured audio profiles.

The hotkeys can be changed in your ``config.toml`` using the above snippet.
Set to empty string to disable the hotkey.

To enable hotkeys to change to specific audio profiles, set the ``hotkey``
value for the audio profile in the configuration file.

Using the previous example:

::

    [muttr.changer.options.music]
    hotkey = "<cmd_l>+<alt>+1"
    sink = "M-Track 2X2M Digital Stereo (IEC958)"

    [muttr.changer.options.meeting]
    hotkey = "<cmd_l>+<alt>+2"
    card_profile = [
        "bluez_card.20_74_CF_92_CD_06",
        "Headset Head Unit (HSP/HFP)",
    ]
    source = "OpenComm by Shokz"
    sink = "OpenComm by Shokz"

    [muttr.changer.options.game]
    hotkey = "<cmd_l>+<alt>+3"
    source = "SteelSeries Arctis 7 Analog Mono"
    sink = "SteelSeries Arctis 7 Analog Stereo"

With the above configuration the hotkeys ``CMD+ALT+1`` can be used to change to
the ``music`` audio profile, and so on.


Using system wide configuration files
-------------------------------------

Muttr support the following files for system wide and/or user wide setup:

- ``/etc/muttr/config.toml``
- ``~/.config/muttr/config.toml``

Configuration files will be read in that order and the last will override any
configuration from the previous file. Finally, user configuration files passed
using argument ``-c`` or ``--config`` are read last in the order the user
passed the arguments to the CLI.


Changelog
=========

1.0.0 (2023-04-1)
------------------

New
~~~

- Initial public version.
- Support for muting and unmuting.
- Support for audio profiles, changing and cycling.
- Support for global hotkeys and audio profile specific hotkeys.


0.1.0 (2022-05-18)
------------------

New
~~~

- Development preview.


License
=======

::

   Copyright (C) 2017-2023 KuraLabs S.R.L

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kuralabs/muttr",
    "name": "muttr",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "muttr",
    "author": "KuraLabs S.R.L",
    "author_email": "info@kuralabs.io",
    "download_url": "https://files.pythonhosted.org/packages/33/b7/665f99a1a2dcbf8bfdccee2c282f4f30fd228c90539d6590eb83f85854a5/muttr-1.0.0.tar.gz",
    "platform": null,
    "description": "=====\nMuttr\n=====\n\n.. image:: https://img.shields.io/pypi/v/muttr\n   :target: https://pypi.org/project/muttr/\n   :alt: PyPI\n\n.. image:: https://img.shields.io/github/license/kuralabs/muttr\n   :target: https://choosealicense.com/licenses/apache-2.0/\n   :alt: License\n\n*Mute all inputs, or change audio outputs and inputs easily.*\n\n.. image:: ./muttr.png\n   :height: 250px\n\nSo, you're in a meeting a need to mute yourself (all microphones!),\nindependently of the application you're running? Done.\n\nYou're done with your meeting, you put your headset down and want to listen to\nmusic in a different audio output? Done.\n\nYour colleague said, hey, can we do a quick meeting? Angrily, you pause your\nmusic and grab your headset. Do I need to change the audio input and output\nback to my headset? Yes? Done.\n\n**So, what's Muttr?**\n\nMuttr is a tool specially made for COVID-19 pandemic working from home people.\n\nIt allows to:\n\n- Mute all sources (microphones) at the same time, in case the application is\n  getting audio from a different source of the one you think its on.\n\n  *Am I muted? Am I muted? Yes, you are!*\n\n- To mute independently of the application you're running (Slack, Zoom, Teams)\n  because it mutes the sound server from the operating system (PulseAudio).\n\n  *What was the hotkey for Slack? Oh wait that's the hotkey for Teams! Where*\n  *is that damn mute button and why it is so small and hidden and dark?*\n\n- To change between audio profiles, for example, to quickly change to your\n  headset before a meeting, and then change back to your speakers to listen\n  music.\n\n  *Yay meeting is no more, music fun times, oh wait forget about it.*\n\n\nMuttr uses PulseAudio API to do all of this, so it is supported in operating\nsystems that use PulseAudio to control the audio devices. For example, Ubuntu,\nand many other Linux based operating systems.\n\nWith Muttr you can configure audio profiles, that is, what audio devices,\ntheir inputs and outputs (sources and sinks, in PulseAudio terminology) you\nwant to use at a determined point in time.\n\nYou can mute, unmute, or swap between those audio profiles using the CLI. Or\nyou can assign a key combination, start the Muttr daemon and perform those\nactions using your keyboard. This is great when using macropads!\n\n\nInstall\n=======\n\n.. code-block:: sh\n\n    $ sudo pip3 install muttr\n    $ muttr --version\n\n\nGetting Started\n===============\n\nMute and unmute\n---------------\n\n::\n\n    $ muttr mute\n    $ muttr unmute\n\nThe above will mute and unmute all audio sources in the system.\n\nIf for any reason there is the need to restrict the audio sources to mute the\nfollowing configuration entry may be used:\n\n::\n\n    [muttr.muter]\n    sources = [\"first_source\", \"second_source\"]\n\nCreate a ``config.toml`` with the above entry and run Muttr with:\n\n::\n\n    $ muttr -c config.toml mute\n    $ muttr -c config.toml unmute\n\nUse the following command to identify which sources are available in your\nsystem:\n\n::\n\n    $ muttr show\n\n\nCreate and change audio profiles\n--------------------------------\n\nFirst, connect all your devices (Bluetooth headsets, for example), and run:\n\n::\n\n    $ muttr show\n\nA complete tree of your audio system will print.\n\nCreate a file ``config.toml`` and fill the profiles you need like this:\n\n::\n\n    [muttr.changer.options.meeting]\n    card_profile = [\n        \"bluez_card.20_74_CF_92_CD_06\",\n        \"Headset Head Unit (HSP/HFP)\",\n    ]\n    source = \"OpenComm by Shokz\"\n    sink = \"OpenComm by Shokz\"\n\n    [muttr.changer.options.music]\n    card_profile = [\n        \"bluez_card.20_74_CF_92_CD_06\",\n        \"Headset Head Unit (HSP/HFP)\",\n    ]\n    sink = \"M-Track 2X2M Digital Stereo (IEC958)\"\n\n    [muttr.changer.options.game]\n    source = \"SteelSeries Arctis 7 Analog Mono\"\n    sink = \"SteelSeries Arctis 7 Analog Stereo\"\n\n\nIn this example, the system will have 3 profiles:\n\n#. One for meetings, using a lightweight Bluetooth bone conductor headset.\n   Not the best sound, but is good for voices and is the most comfortable for\n   those long meetings.\n#. One for listening music, using an external interface connected to some\n   great monitor speakers.\n#. One for gaming, a large over-ear headphones, awesome sound.\n   Perfect for immersive experiences.\n\nOnce ready, change between audio profiles using:\n\n::\n\n    $ muttr -c config.toml change music\n    $ muttr -c config.toml change meeting\n    $ muttr -c config.toml change game\n\nAs noted, at least a sink or a source needs to be declared. In many situations\nthere may be the need to change the profile the card associated with the source\nor sink is using. In those situations, use the ``card_profile`` and specify\nwhich card and card profile to use when changing to that audio profile.\n\n\nEnable system wide mode and hotkeys\n-----------------------------------\n\nTo enable kotkeys to change mute/unmute and change between audio profiles run\nMuttr as a daemon:\n\n::\n\n    $ muttr -c config.toml daemon\n\nBy default, the following hotkeys are supported:\n\n::\n\n    [muttr.daemon]\n    hotkey_mute = \"<ctrl>+<alt>+m\"\n    hotkey_unmute = \"<ctrl>+<alt>+u\"\n    hotkey_mute_toggle = \"<cmd_l>+<alt>+m\"\n    hotkey_change_cycle = \"<cmd_l>+<alt>+c\"\n\n:hotkey_mute: Mute all sources.\n:hotkey_unmute: Unmute all sources.\n:hotkey_mute_toggle: Toggle between mute and unmute all sources.\n:hotkey_change_cycle: Change / cycle between all configured audio profiles.\n\nThe hotkeys can be changed in your ``config.toml`` using the above snippet.\nSet to empty string to disable the hotkey.\n\nTo enable hotkeys to change to specific audio profiles, set the ``hotkey``\nvalue for the audio profile in the configuration file.\n\nUsing the previous example:\n\n::\n\n    [muttr.changer.options.music]\n    hotkey = \"<cmd_l>+<alt>+1\"\n    sink = \"M-Track 2X2M Digital Stereo (IEC958)\"\n\n    [muttr.changer.options.meeting]\n    hotkey = \"<cmd_l>+<alt>+2\"\n    card_profile = [\n        \"bluez_card.20_74_CF_92_CD_06\",\n        \"Headset Head Unit (HSP/HFP)\",\n    ]\n    source = \"OpenComm by Shokz\"\n    sink = \"OpenComm by Shokz\"\n\n    [muttr.changer.options.game]\n    hotkey = \"<cmd_l>+<alt>+3\"\n    source = \"SteelSeries Arctis 7 Analog Mono\"\n    sink = \"SteelSeries Arctis 7 Analog Stereo\"\n\nWith the above configuration the hotkeys ``CMD+ALT+1`` can be used to change to\nthe ``music`` audio profile, and so on.\n\n\nUsing system wide configuration files\n-------------------------------------\n\nMuttr support the following files for system wide and/or user wide setup:\n\n- ``/etc/muttr/config.toml``\n- ``~/.config/muttr/config.toml``\n\nConfiguration files will be read in that order and the last will override any\nconfiguration from the previous file. Finally, user configuration files passed\nusing argument ``-c`` or ``--config`` are read last in the order the user\npassed the arguments to the CLI.\n\n\nChangelog\n=========\n\n1.0.0 (2023-04-1)\n------------------\n\nNew\n~~~\n\n- Initial public version.\n- Support for muting and unmuting.\n- Support for audio profiles, changing and cycling.\n- Support for global hotkeys and audio profile specific hotkeys.\n\n\n0.1.0 (2022-05-18)\n------------------\n\nNew\n~~~\n\n- Development preview.\n\n\nLicense\n=======\n\n::\n\n   Copyright (C) 2017-2023 KuraLabs S.R.L\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing,\n   software distributed under the License is distributed on an\n   \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n   KIND, either express or implied.  See the License for the\n   specific language governing permissions and limitations\n   under the License.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Muttr. Mute all inputs, or change audio outputs and inputs easily.",
    "version": "1.0.0",
    "split_keywords": [
        "muttr"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3786f1e1c5d825e9df0c8a00d6d91e0f92e8454064912775e173c386044a347e",
                "md5": "841f468e67dfca0b73e0b7b6f5291c16",
                "sha256": "9c810654b58ac566e7712ccb23be1fb568208dd2e9aaff79a53140c6de7c63c6"
            },
            "downloads": -1,
            "filename": "muttr-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "841f468e67dfca0b73e0b7b6f5291c16",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 109819,
            "upload_time": "2023-04-01T09:51:14",
            "upload_time_iso_8601": "2023-04-01T09:51:14.074910Z",
            "url": "https://files.pythonhosted.org/packages/37/86/f1e1c5d825e9df0c8a00d6d91e0f92e8454064912775e173c386044a347e/muttr-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "33b7665f99a1a2dcbf8bfdccee2c282f4f30fd228c90539d6590eb83f85854a5",
                "md5": "183afec855bc0311ba5532f7ef11a071",
                "sha256": "ebedfa9e6fb133349f4ba0c318820e8f581f38910db3e87fd2de4d01599ce48d"
            },
            "downloads": -1,
            "filename": "muttr-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "183afec855bc0311ba5532f7ef11a071",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 112125,
            "upload_time": "2023-04-01T09:51:16",
            "upload_time_iso_8601": "2023-04-01T09:51:16.869900Z",
            "url": "https://files.pythonhosted.org/packages/33/b7/665f99a1a2dcbf8bfdccee2c282f4f30fd228c90539d6590eb83f85854a5/muttr-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-01 09:51:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "kuralabs",
    "github_project": "muttr",
    "lcname": "muttr"
}
        
Elapsed time: 7.29924s