KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Speech friendly command completion for emacs?
Topic Summary: eg user says "unread next", suggests gnus-summary-next-unread-article
Created On: 12/23/2021 02:26 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Speech friendly command completion for emacs?   - Ag - 12/23/2021 02:26 PM  
 12/23/2021 02:26 PM
User is offline View Users Profile Print this message

Author Icon
Top-Tier Member

Posts: 775
Joined: 07/08/2019

BRIEF: can anyone point me to "speech friendly command completion" packages in emacs.

 or, if not really speech friendly at the moment, command completion packages that can do things like reorder the words that the user has typed. Completion packages that I can use in combination with code that I have already written.


---+  DETAIL


I use EMACS.  emacs has a full elisp command language. Therefore instead of emitting control key shortcuts like ^x^s, I find it more reliable to emit


  • {Esc}{x}save-buffer{Enter}
Where save-buffer is the emacs command that is usually bound to the keys ^X^S
This is more reliable in the sense that you get to control exactly what command gets invoked.  since emacs key-bindings often change, in  buffer and mode specific manners,  this can avoid accidents. 
when you are typing an emacs command via {Esc}{x}  (which itself maps to execute-extended-command)
you get the benefit of command completion
e.g. you type {Esc}{x}save
 but you cannot remember if it's just save or save file or save buffer
 so you type {Esc}{x}save[tab]
And emacs  shows you the list of matching commands.
Yes, this is like Microsoft IntelliSense,  which I believe was actually written in imitation or emulation of early versions of Emacs completion. There are many many many different emacs completion packages, many of which are much much much better than IntelliSense.
 these packages provide completion for many different types of data, including emacs commands, filenames,  font names (Lucid...).   it's easy to write your own for a static list, e.g. I have done that repeatedly for signal names in RTL.
 these packages provide many different styles of command completion.  Strict prefix completion  was I believe the first,  but it can also interpolate words
{Esc}{x}gnus--next--[tab] ==> A list of several possibilities including gnus-summary-next-unread-article, etc.
 I am not aware of anything that can interpolate words out of order,  but  I hope that something like this already exists.
What I  am looking for is(are)  emacs completion packages that are more speech friendly.
 In particular for emacs interactive commands, but I'm sure that I will also wanted for other datatypes.
 I think that "speech friendly"  starts off by eliminating blanks and/or  converting to hyphens,  upper case/lowercase, but also allows words to be searched for out of order. Speech friendly completion probably is more word oriented than a single character typing oriented completion packages that are most common.  speech friendly completion will also undoubtedly involve making it easier to select the chosen item by voice, rather than by choosing with mouse.
I have written an emacs interactive function that takes a user utterance like "go to line", and searches  for  emacs commands of similar but not exactly the same name, like "goto-line" so that you don't need  to have to say something like "go nospace to hyphen line" to specify an emacs command name.
It also searches a 'path' of   namespace prefixes and suffixes, eg to get  or "my-special-goto-line".  my current examples are, in a Gnus email Summary buffer, "next unread" --> gnus-summary-next-unread, and so on.
All emacs functionality is associated with function names that often are quite meaningful. But they nearly always have these namespace prefixes.  My search tool avoids the need for me have to pronounce those prefixes.  
This greatly reduces the number of emacs specific speech commands that I need to write. Often I can look them up in online documentation, and directly invoke them.   I may create aliases, like "next" -> gnus-summary-next-unread,  but that's just for shortening. It is very refreshing to be able to invoke  commands by name straight out of the manual.
My code is essentially a step towards a speech oriented command completion mode for emacs.   I will share eventually, when I'm not embarrassed by it. 
But I also hope that people can tell me about existing  emacs command completion  functions that this might work well in conjunction with. There are so many different  Packages to do command completion in emacs....   in particular, I am looking for something that can do efficient searches for words in any order, e.g. have both utterrances "next unread" and "unread next" find gnus-summary-unread-next.



DPG15.6 (also DPI 15.3) + KB, Sennheiser MB Pro 1 UC ML, BTD 800 dongle, Windows 10 Pro, MS Surface Book 3, Intel Core i7-1065G7 CPU @ 1.3/1.5GHz (4 cores, 8 logical, GPU=NVIDIA Quadro RTX 3000 with Max-Q Design.

32285 users are registered to the KnowBrainer Speech Recognition forum.
There are currently 0 users logged in.
The most users ever online was 12124 on 09/09/2020 at 04:59 AM.
There are currently 382 guests browsing this forum, which makes a total of 382 users using this forum.

FuseTalk Standard Edition v4.0 - © 1999-2022 FuseTalk™ Inc. All rights reserved.