MycroftAI/Mycroft-Android

Possibility to move away from Android's builtin Google STT

Opened this issue · 0 comments

Task: Offer the user an alternative to Android's builtin Google STT.

Motivation: My personal use case.
I started using Picroft to avoid using an Alexa or Google's home assistant. I then started using the android app because I did not want a microphone listening 24/7 at home.
I don't expect anyone else out there to need this, so I'll try to work on it myself as soon as I get rights to push a branch to the repo.

Expected bumps:

  • It is going to be slower and less precise, so I'll try to just hide the option a bit
  • If the STT is triggered from the phone (as it now works with Google), it will probably require that the user sets some API keys for that other service manually. For now I'll go the hard way, send the audio to the raspberry and make mycroft-core take care of the STT.
  • It will either need modifications on mycroft-core's messagebus, or a dedicated service to receive the audio from the app and pass it over to mycroft's STT. Meaning...even more difficult to test.
  • Security, I hope to get this right from the beginning but probably I will not
  • I have never programmed in Kotlin. I am not a developer and know little about tests (apart from the fact that I need to implement them).

How I'll try to make this work:

  • Add a switch to the app's configuration. Something like "Use Google STT?". Default to True.
  • If the switch is off, instead of opening Google's STT the app will record for x seconds (4?) and either stream it to the raspberry pi (which I don't know how to do) or save it in the phone and send it to the raspberry pi afterwards (which means using a compressed file and decompressing it in the raspberry, making it even slower)
  • At the Raspberry's side, once the audio file is right, I'll try to inject it as if it were a regular command spoken to the microphone, and let the process continue. I still haven't checked how to do this, but to avoid messing with the messagebus for now, I'll build another service that takes care of this.

Any ideas will be much appreciated.