Currently Being ModeratedAug 20, 2013 2:14 PM (in response to r.haider)
Welcome to Apple Support Communities
OS X Mountain Lion includes Dictation for this purpose > http://support.apple.com/kb/HT5449 To enable it, open System Preferences > Dictation and Speech > Dictation, enable it and choose the language. When you want to type something by talking to the Mac, double-press the Fn key and talk.
If you have an older OS X version, use an app like Dragon Dictate > http://www.macspeech.com/dictate/