Make sure you've given Safari permission to access your microphone. To check, on the top left of your screen in the Mac toolbar, go to Safari, then in the menu click on Preferences.
Click on the Websites tab.
On the right under Currently Open Websites
should be listed. Click the dropdown and select Allow
If your microphone is still not working after allowing permission to access it, click on the Apple icon on the top left of your screen, then click System Preferences from the menu.
Under System Preferences, click on Sound.
Click on Input from the segmented control and then check which device is selected for sound input.
Change this selection until your audio is picked up on your selected microphone.
Under General on the left side, click Microphone.