Speech recognition can be activated when typing on your Android device.
If this facility is available in the app you are using, a microphone icon will appear on the keypad. Pressing this activates the speech recognition.
Android does have offline speech recognition capabilities.
You can activate this by going to Settings - Language and Input - Voice Input and touch the cog icon next to Enhanced Google Services.
Choose "Offline Speech Recognition" and select the "All" tab to download your preferred language if it's not already installed. The location of this setting can vary slightly depending on the version of Android your device is running and the manufacturer.
Once the language is installed and set as default, you should find that offline speech recognition works in apps such as Google Keep, Google Calendar, Gmail, Docs etc
Depending on the app you are using, speech recognition sometimes requires an internet connection to work. Please note that some apps require to send your speech to a server in order to convert it to text.