Starting with Windows 10 version 1803 (April 2018 update), Microsoft changed the behavior of microphone app access setting so that it affects desktop applications as well.

To fix this do the following:

1. Go to Windows Settings and select Privacy. Alternatively, type in Windows Taskbar/Startmenu Search: microphone privacy settings

2. Select Microphone. Verify that it says "Microphone access for this device is on". If it's off, press Change and toggle it on.

3. Switch on the "Allow apps to access your microphone" toggle.

4. Under "Choose which apps can access your microphone" check that Win32WebViewHost (later renamed as Desktop App Web Viewer) is turned on as some desktop applications will need it.

(Optional) To block apps access to microphone you will have to toggle microphone off for each app. You will have to do this after each new app you install. It's recommended that you do not turn off microphone access for Win32WebViewHost (later renamed as Desktop App Web Viewer ) as some desktop applications will need it.

5. Scroll down and check if you have "Allow desktop apps to access your microphone" section and turn that toggle on as well.

6. Restart those applications where you've wanted to use the microphone.

If you still have problems, check Troubleshoot and fix microphone problems in Windows guide.

Applies to Windows 10 versions 1803 (April 2018 update), version 1809 (October 2018 update), version 1903 (April 2019 update), version 1909, version 2003 and later, Windows Server 2019. Useful for Skype, TeamSpeak, Discord, WhatsApp, Steam voice chat, OBS Studio, XSplit, Bandicam, Adobe Audition, Audacity, ocenaudio, Edge, Chrome, Firefox, Opera, Facebook Messenger, Zoom, Microsoft Teams, Slack, Cisco Webex, Twitch,Viber etc. [show more] [hide] Useful for microphones and notebooks from Logitech, Blue Yeti, Microsoft, Dell, HP, Acer, Lenovo, ASUS, Razer, Genius, Trust.

Thanks to Shane and RatusNatus for the tips.