Audio Apps

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on

Available as/for: -

System tray application that can be kicked by dbus and will switch CaptureDevice
to enabled or disabled state. The primary goals of this software is doing the
-- Show microphone capturing state (uses alsa notifications)
-- Switch microphone capturing state by hotkey (only dbus messages are

This is my first simple application on Python. It was developed for Skype
meetings to be sure when microphone is enabled and when it isn't.

To use it you need PyQt4 and pyalsa installed using dbus is currently optional. If you can't find pyalsa in your package repository, try to install it via "easy_install pyalsa". easy_install is a part of setuptools (or python-distribute) package. When the
application is launched it puts microphone icon into the system tray. If capture
device is disabled, red crossing circle will be added. CaptureDeviceTray utility
uses pyalsa library ( for checking status of alsa capturing device and receiving
notifications. So this utility can be used just to show your capturing device
state. Also you can change the state of selected device via dbus calls to the

Sample dbus calls to switch capture state:
-- Via CaptureDeviceTray utility
qdbus org.kde.capturedevice /CaptureDevice org.kde.CaptureDevice.SwitchState
-- Via kmix:
qdbus org.kde.kmix /Mixer0 org.kde.KMix.setRecordSource Capture:0 [True|False]
-- Via amixer command-line:
amixer sset Capture,0 capture [cap|nocap]

To set up capture device name in CaptureDeviceTray, place the device name to
CaptureDevice.conf. Only one device could be specified for now. To know your
name, open kmix and find the capture channel you need. I have two capture
channels: "Capture" and "Capture 2". To use "Capture" put the "Capture:0" line
into config to use the second one, use "Capture:1" etc. 'amixer scontrols'
output could be helpful

To use the CaptureDeviceTray unpack the archive somewhere you like. I'm using
~/programs/. Then start the application via krunner using full path. If you run
it via krunner it will be started again at login automatically. Then you could
use context menu to check does it work. Then try dbus commands listed above.

To bind hotkey for switch you can use Custom Shortcuts in KDE System Settings ->
Shortcuts and Guestures. To add new shortcut click Edit -> New -> Global
Shortcut -> DBus command. In trigger tab set your hotkey, in Action tab set the
Remote application: org.kde.capturedevice
Remote object: /CaptureDevice
Function: org.kde.CaptureDevice.SwitchState
Arguments: leave this field empty
Try Call button to check.

Have a lot of fun!
Last changelog:

10 years ago

0.1 - Initial revision.
0.2 - Don't require kmix. Listen ALSA notifications via pyalsa.
0.3 - Switch state on click action.



10 years ago

Cool idea; I can't count the times I was having mic issues where this would have come in handy. Do you know how well it interacts with PulseAudio?
I can't help but wonder though, wouldn't something like this be better implemented as a Plasma widget? Given you made it dependent on KDE, it just seems logical. :)


10 years ago

0.1 - Initial revision.
0.2 - Don't require kmix. Listen ALSA notifications via pyalsa.
0.3 - Switch state on click action.

product-maker Contrast Mar 26 2011 9 excellent
product-maker Znurre Feb 11 2011 9 excellent
Be the first to comment
Feb 11 2011
Feb 11 2011
File (click to download) Version Description PackagetypeArchitectureRelease ChannelDevices Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
0 Affiliates
updated Mar 01 2011
added Feb 09 2011
downloads 24h
mediaviews 24h 0
pageviews 24h 1