MichaelMcCulloch / WhisperVoiceKeyboard

A voice to text keyboard based on OpenAI Whisper Model.
MIT License
45 stars 5 forks source link

By Popular Request: An actual Keyboard OR a autocorrect/suggestion bar. #5

Open MichaelMcCulloch opened 1 year ago

MichaelMcCulloch commented 1 year ago

From the start, the idea was that this would be a supplement only to the user's favorite on-screen keyboard. However, the process of switching keyboards is somewhat cumbersome.

Three options:

  1. A quick switch button that sets the input method to the user's favorite keyboard.
  2. An actual keyboard that doesn't feel like an afterthought.
  3. A layout element above the buttons which contains correction suggestions.

I dislike option 1, because the process of getting back to this input method is still cumbersome. I dislike option 2 because I have no idea how to make a good on-screen keyboard. Option three feels like a good compromise. If it's accurate enough, then the user won't need an actual keyboard. Hopefully.

Kaljurand commented 1 year ago

Android supports option 1 to some extent. It does not know what the user's "favorite keyboard" is, but it knows the next and previous keyboards (see e.g. https://developer.android.com/reference/android/inputmethodservice/InputMethodService#switchToNextInputMethod(boolean)). Unfortunately most popular Android IMEs do not offer a single-click UI to switch to the next/previous keyboard, but IMO this is an example of lock-in that should not be followed. So I'd vote for option 1.

Additionally, you could offer the recognition as a service (https://developer.android.com/reference/android/speech/RecognitionService) so that any IME can integrate it.

MichaelMcCulloch commented 1 year ago

I think I will take a look into option one in the near future. One issue is that the 'other' keyboard may not offer a quick switch back. But I will ignore this, as you suggested.

As far as implanting a speech recognition service, I believe when I started out, that was my intent, however I became frustrated with the interface and gave up. I think some keyboards also package their own recognizer, so it's not a universal solution. It is a good idea though so I'll take another crack at it.

SamirSaidani commented 1 year ago

Problem with 3 is that sometimes you need more control on correction, like correcting the whole word and suggestions might be irrelevant. It happens for proper names for instance.

2 seems ok to me, you don't need to reinvent the wheel, there is some good enough opensource keyboard out there.