Does the onscreen microphone come up but it doesn't convert speech to text? Or does the onscreen microphone not appear at all?
In System Preferences > Dictation & Speech > Dictation, is the microphone set to "Automatic"? You might try setting it to "Internal microphone" to see if it works.
Have you tried restarting the iMac?