I tried adding the allow="microphone" tag in iframe that I added in salesforce lightning component, but when I load the page it throws a
Uncaught AuraFriendlyError. Is it not supported, also if not is there any other way
This is blocked by lockerservice .You can find more details using Locker API Viewer
You can disable the locker by using an API version equal to 39.0 or below in your aura component . However note that this is a security violation and locker service is recommended to keep your component secure .