If you want to give keyboard inputs to apps that aren't your own, the only way is to build your own alternative keyboard. After this, the user will have to select your keyboard as his keyboard of choice so that it shows up whenever textboxes receive focus. You can even listen for voice inputs and parse them to do what you need. These links might help:
Keyboard:
- How to make a Android custom keyboard?
- Create Custom Keyboard in Android
- creating custom android keyboard layout
Voice input: