nircmd_使用NirCmd和Elgato StreamDeck以编程方式更改系统的麦克风和扬声器

本文介绍了如何使用NirCmd工具和Elgato StreamDeck设备,通过编程方式实现Windows系统中麦克风和扬声器的快速切换,以适应不同应用场景,如电话会议、录制播客等。
摘要由CSDN通过智能技术生成
nircmd

nircmd

I've got a lot of different sound devices like USB Headphones, a formal Conference Room Speakerphone for conference calls, and 5.1 Surround Sound speakers, as well as different mics like a nice Shure XLR connected to a PV6 USB Audio Mixer, as well as the built in mics in my webcams and other devices.

我有很多不同的声音设备,例如USB耳机,用于电话会议的正式会议室免提电话和5.1环绕声扬声器,以及各种麦克风(例如连接到PV6 USB音频混音器的漂亮的Shure XLR)以及我的网络摄像头和其他设备中的内置麦克风。

There's lots of great audio apps and applets that can improve the audio switching situation on Windows. I like Audio Switcher and the similarly named https://audioswit.ch/er, for example.

有很多很棒的音频应用程序和小程序可以改善Windows上的音频切换情况。 例如,我喜欢Audio Switcher和类似名称的https://audioswit.ch/er

You can also automatically change your audio inputs automatically depending on the app. So if you always want to record your podcast with Audacity you can tell Windows 10 to always set (lie) the audio ins and outs on an app by app basis. The app will never know the difference.

您还可以根据应用程序自动自动更改音频输入。 因此,如果您始终想用Audacity录制播客,则可以告诉Windows 10始终按应用逐个设置(设置)音频输入和输出。 该应用程序永远不会知道区别。

But I need to change audio a lot when I'm moving from Teams calls, recording Podcasts, and watching shows. I've got this Elgato Stream Deck that has buttons I can assign to anything. Combine the Stream Deck with the lovely NirCmd utility from NirSoft and I've got one click audio changes!

但是当我离开团队电话,录制播客和观看节目时,我需要大量更改音频。 我有这个Elgato Stream Deck ,它具有可以分配给任何东西的按钮。 将Stream Deck与来自NirSoft的可爱的NirCmd实用程序结合使用,我一键更改了音频!

The icons are just PNGs and there's lots available online. I created a bunch of batch files (*.bat) with contents like this:

图标只是PNG,在线上有很多可用。 我创建了一堆批处理文件(* .bat),其内容如下:

nircmdc setdefaultsounddevice "Speakers" 0

and

nircmdc setdefaultsounddevice "Headphones" 0  

The last number is 0, 1, or 2 where that means Console, Multimedia, or Communications. You can have one sound device for apps like Netflix and another for apps like Skype that identify as Communications. I just change all defaults, myself.

最后一个数字是0、1或2,表示控制台,多媒体或通信。 您可以为Netflix之类的应用程序使用一个声音设备,为Skype之类的应用程序使用另一个声音设备,该设备可以识别为“通讯”。 我自己更改所有默认值。

You can also add in commands like "setsubunitvolumedb" and others to have preset volumes and levels for line-ins. It's ideal for getting reliable results.

您还可以添加诸如“ setsubunitvolumedb”之类的命令以及其他命令以预先设置行的音量和音量。 这是获得可靠结果的理想选择。

Elgato Stream Deck

Then just use the Stream Deck utility to assign the icon and batch file using the "System | Open" widget. Drag it over and assign and you're set! If you can't figure out what the names of your sound devices are, you can call nircmd showsoundevices.

然后,只需使用Stream Deck实用程序通过“系统|打开”窗口小部件分配图标和批处理文件即可。 将其拖动并分配,即可完成设置! 如果您不知道声音设备的名称,可以致电nircmd showsoundevices

It just took a few minutes to set this up and it'll save me a bunch of clicks every day.

只需几分钟即可完成设置,每天可以为我节省很多点击次数。

翻译自: https://www.hanselman.com/blog/programmatically-change-your-systems-mic-and-speakers-with-nircmd-and-elgato-streamdeck

nircmd

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值