|
1 | 1 | # SWAP
|
2 |
| -Smart Windows Audio Profiles |
| 2 | +SmartWindowsAudioProfiles (SWAP) |
| 3 | + |
| 4 | +This software is not affiliated and is an independent software that needs SoundVolumeView by NirSoft (https://www.nirsoft.net/utils/sound_volume_view.html) to work properly. |
| 5 | +Support NirSoft's amazing tools. |
| 6 | + |
| 7 | +## Usage |
| 8 | +Launch with `python swap.py` |
| 9 | + |
| 10 | +You can also compile it to an exe by having the *.ico and *.spec file in same folder as swap.py and doing `pyinstaller swap.spec`. The output exe will be in the "dist" folder. |
| 11 | +Then you simply execute the exe file to launch it. |
| 12 | + |
| 13 | +Once launched, the app will ask you to provide the path where SoundVolumeView by NirSoft is installed (or you can also put SoundVolumeView.exe in the same folder as SmartWindowsAudioProfiles.exe). |
| 14 | +Once done, click on "Test SoundVolumeView" to ensure that the app is properly linked to SmartWindowsAudioProfiles. |
| 15 | +Go to "Audio Devices" tab and Refresh Device List. |
| 16 | +You can now go to"Profiles" and create a new profile then start adding rules. |
| 17 | +The rules will be to set an Input audio device and an Output audio devices for a given running application. |
| 18 | +Each rule is in two parts (input+output). |
| 19 | +Once done, save and you can create another profile. |
| 20 | +When you wish, you can then activate a profile by selecting it, and clicking on "Activate profile". |
| 21 | +Alternatively, you can also activate a profile via command line as such : `SmartWindowsAudioProfiles.exe PROFILE_NAME` where PROFILE_NAME is the name of your profile. |
| 22 | + |
| 23 | +![Image]() |
| 24 | + |
| 25 | +## Config |
| 26 | +A config.ini file will be generated to adjust some settings. |
| 27 | + |
| 28 | +``` |
| 29 | +[App] |
| 30 | +soundvolumeview_path = SoundVolumeView.exe |
| 31 | +auto_save = False |
| 32 | +``` |
| 33 | +adjust "soundvolumeview_path" as per the path to SoundVolumeView.exe (it can be as is if SoundVolumeView.exe is in the PATH environement, or in same folder as SmartWindowsAudioProfiles.exe |
| 34 | + |
| 35 | +adjust "auto_save" to True or False to save automatically any changes done on profiles/rules. |
| 36 | + |
| 37 | +Note: no need to adjust this file manually, all can be done via the GUI. |
| 38 | + |
| 39 | +## Profiles |
| 40 | +A audio_profiles.json file will be generated with your profiles and respective rules. |
| 41 | +You can programatically generate it as well following this format (this is an exemple of a profile named "PROFILE_NAME" with 1 rule (input+output) for the chrome.exe application: |
| 42 | + |
| 43 | +``` |
| 44 | +{ |
| 45 | + "profiles": { |
| 46 | + "PROFILE_NAME": { |
| 47 | + "rules": [ |
| 48 | + { |
| 49 | + "app_name": "chrome.exe", |
| 50 | + "device_id": "VB-Audio Virtual Cable A\\Device\\CABLE-A In 16ch\\Render", |
| 51 | + "device_name": "VB-Audio Virtual Cable A", |
| 52 | + "item_id": "{0.0.0.00000000}.{43fac67b-ac3d-4287-a3aa-b4c5a678a3ec}", |
| 53 | + "name": "CABLE-A In 16ch", |
| 54 | + "direction": "Render" |
| 55 | + }, |
| 56 | + { |
| 57 | + "app_name": "chrome.exe", |
| 58 | + "device_id": "VB-Audio Virtual Cable A\\Device\\CABLE-A Output\\Capture", |
| 59 | + "device_name": "VB-Audio Virtual Cable A", |
| 60 | + "item_id": "{0.0.1.00000000}.{23b82c5e-caa6-433a-b138-d72333cfea13}", |
| 61 | + "name": "CABLE-A Output", |
| 62 | + "direction": "Capture" |
| 63 | + } |
| 64 | + ] |
| 65 | + } |
| 66 | + } |
| 67 | +} |
| 68 | +``` |
| 69 | + |
| 70 | +Note: no need to adjust this file manually, all can be done via the GUI. |
0 commit comments