Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Recognize and replace word "keycode"/"key code" to enter Android keycodes #71

Open
sudomain opened this issue Apr 13, 2024 · 3 comments

Comments

@sudomain
Copy link

sudomain commented Apr 13, 2024

Hello,

First, thank you for the app. I only discovered it today on F-Droid, but I love it. I think this feature could add a lot of functionality and offer a workaround to some of the existing issues regarding entering numbers, #19 and punctuation, #14 :

When the user says the word(s) "keycode" or "key code" followed by the name of one of the Android keycodes, the corresponding key will be entered. For example, the user says:
Alice has key code three apples
The IME will input:
Alice has 3 apples

This is flexible: If the user wants to have the word "three" instead of 3, they can just omit saying "key code".

This can enable:

  • Literal numbers with keycode one, keycode two, keycode three (1, 2, 3) ...
  • Literal punctuation with keycode comma, keycode period, keycode slash (, . /) ...
  • Text editing with keycode enter, keycode del
  • Android system navigation with keycode back, keycode home

And possibly (I haven't tested these in my other app that enter key codes):

  • Capitalizing with keycode caps lock, keycode shift

There are some benefits to this approach:

  1. Most of the existing keycodes are logically named and easy to learn (or guess)
  2. The same vosk model can be used and a separate punctuation model isn't necessary. Sayboard just intercepts and replaces when "key code ___" is said
  3. The words "keycode" and "key code" are unlikely to trigger false positives, unless the user happens to be dictating about the topic of keycodes.

There are IMEs that can enter the above keycodes, such as Hacker's keyboard and Key Mapper, but they can't do it with the vosk model sayboard provides.

@sudomain sudomain changed the title Feature Request: Recognize word "keycode"/"key code" to enter Android keycodes Feature Request: Recognize and replace word "keycode"/"key code" to enter Android keycodes Apr 13, 2024
@ghost
Copy link

ghost commented Apr 13, 2024

That's an interesting way to go about it.

Why not have a "start" & "end" key code? That way if you are going to say, 375,567, you don't have to say key code after every number.

So, there would be a singular key code phrase, as you suggest, and a paired one that's a start & end key code. 🤷‍♂️

I would be annoyed saying a phase for every single thing when I've got several in a row that I have to say.

Though I'm still a big proponent of full integration of SayBoard into a full keyboard, like HeliBoard, where you have full access to the keyboard while voice input runs as a small mic overlay. 😁 you just wouldn't care all that much about numbers and punctuation, IMO, if they were easily accessible all the time. 🤷‍♂️ specialized words also become a nonissue.

@sudomain
Copy link
Author

A toggle-able keycode mode would be nice

@0siribix
Copy link

0siribix commented Nov 4, 2024

Why not mske it extensible? Add keyword rules


"sayboard number" "{replace number}"

"my name is 0siribix and my number is sayboard number five five five dash one two three four" -> "My name is 0siribix and my number is 555-1234"

Match rule ends either with another keyword like "sayboard end" or after configurable pause

"sayboard spell" "{manual spelling}"

"sayboard spell zero ess eye are eye bee eye ex" -> "0siribix"

and we need an escape in order to type something without matching rules

"sayboard literal" "{no rules}"
"exclamation point" -> "!"
"sayboard literal exclamation point sayboard end" -> "exclamation point"

would also be nice to have some other functions like

  • delete last word
  • clear all text
  • cursor to beginning
  • cursor to end
  • copy
  • cut
  • paste
  • switch to app
  • open app activity
  • search web

or just to run a custom activity or command line and we could probably build most of the above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants