KnowBrainer Speech Recognition
Decrease font size
Increase font size
Topic Title: Emacs and Dragon NaturallySpeaking 12
Topic Summary: This is a poorly documented topic, can anyone provide concise up-to-date info?
Created On: 04/25/2013 02:53 PM
Status: Post and Reply
Linear : Threading : Single : Branch
 Emacs and Dragon NaturallySpeaking 12   - dagst47 - 04/25/2013 02:53 PM  
 Emacs and Dragon NaturallySpeaking 12   - Lunis Orcutt - 04/25/2013 05:39 PM  
 Emacs and Dragon NaturallySpeaking 12   - dagst47 - 04/25/2013 07:18 PM  
 Emacs and Dragon NaturallySpeaking 12   - Mac - 04/25/2013 07:58 PM  
 Emacs and Dragon NaturallySpeaking 12   - mdl - 04/25/2013 10:06 PM  
 Emacs and Dragon NaturallySpeaking 12   - dagst47 - 04/25/2013 10:45 PM  
 Emacs and Dragon NaturallySpeaking 12   - Mac - 04/26/2013 07:49 AM  
 Emacs and Dragon NaturallySpeaking 12   - dagst47 - 04/26/2013 10:41 AM  
 Emacs and Dragon NaturallySpeaking 12   - Mac - 04/26/2013 11:35 AM  
 Emacs and Dragon NaturallySpeaking 12   - Mac - 04/26/2013 12:59 PM  
 Emacs and Dragon NaturallySpeaking 12   - dagst47 - 04/26/2013 01:33 PM  
 Emacs and Dragon NaturallySpeaking 12   - mdl - 04/26/2013 10:10 PM  
 Emacs and Dragon NaturallySpeaking 12   - mdl - 04/26/2013 10:17 PM  
 Emacs and Dragon NaturallySpeaking 12   - dagst47 - 04/26/2013 11:08 PM  
 Emacs and Dragon NaturallySpeaking 12   - Mac - 04/27/2013 07:29 AM  
 Emacs and Dragon NaturallySpeaking 12   - Mac - 04/27/2013 03:49 PM  
 Emacs and Dragon NaturallySpeaking 12   - mdl - 04/25/2013 10:03 PM  
 Emacs and Dragon NaturallySpeaking 12   - dagst47 - 04/25/2013 10:49 PM  
 Emacs and Dragon NaturallySpeaking 12   - dagst47 - 04/30/2013 11:56 AM  
 Emacs and Dragon NaturallySpeaking 12   - dagst47 - 04/30/2013 12:13 PM  
 Emacs and Dragon NaturallySpeaking 12   - mdl - 04/30/2013 01:52 PM  
 Emacs and Dragon NaturallySpeaking 12   - mdl - 04/30/2013 01:55 PM  
 Emacs and Dragon NaturallySpeaking 12   - dagst47 - 04/30/2013 04:50 PM  
 Emacs and Dragon NaturallySpeaking 12   - ben_west - 01/22/2016 04:46 PM  
 Emacs and Dragon NaturallySpeaking 12   - mdl - 01/22/2016 08:21 PM  
 Emacs and Dragon NaturallySpeaking 12   - rvsw - 01/23/2016 01:44 AM  
 Emacs and Dragon NaturallySpeaking 12   - mdl - 01/23/2016 10:48 PM  
Keyword
 04/25/2013 02:53 PM
User is offline View Users Profile Print this message

Author Icon
dagst47
New Member

Posts: 14
Joined: 04/25/2013

I've been searching extively for solutions to using DNS (v.12) with Emacs (current version, I believe 24.x). Much of the documentation is out-of-date, or written for someone with much more knowledge of computer programming.

Currently (ie using DNS12), is there any way to dictate (text, not commands) into emacs without the intermediate step of DragonPad? If so, can you please provide a link to current info on the topic? My motivation for using emacs is that I can create yasnippets and simply tab between field entry points to create reports quickly (but still retain the ability to modify the base form on the fly, as needed).

I've tried VR-mode, which didn't work. ShortTalk looks a little more current, but is throwing all kinds of errors with fonts that >should< be installed (yes, I reinstalled them).

Any current info, in lay-terms, or even a .emacs file would really help me out!

Thank you in advance!

-D

 04/25/2013 05:39 PM
User is offline View Users Profile Print this message

Author Icon
Lunis Orcutt
Top-Tier Member

Posts: 39368
Joined: 10/01/2006

We know nothing about Emacs other than it appears to not be SAPI compliant which means that you apparently cannot dictate directly into the application other than from a command point of view. While you don't necessarily need to go through DragonPad, which would involve extra steps, you will probably have to resort to the Dictation Box or, if you're using KnowBrainer 2012 (hyperlinked in our signature tag), NotePad. There is no end-user way to make a non-SAPI compliant application Full Text Control or Active Assessable (short of pleading with the manufacturer).



-------------------------

Change "No" to "Know" w/KnowBrainer 2020
Trial Downloads
Dragon/Sales@KnowBrainer.com 
(615) 884-4558 ex 1

 04/25/2013 07:18 PM
User is offline View Users Profile Print this message

Author Icon
dagst47
New Member

Posts: 14
Joined: 04/25/2013

Thanks Lunis-
Just breaking it down a bit more for the tech-newbile that I am - what you're saying is that I can "control" emacs with Dragon, or enter commands that are interpreted by emacs, but I cannot use Dragon to input text into the buffer. Correct??

Does anyone have any solution for creating base forms that I can "tab" between fields on? I can create forms within Word, but inevitably they need to be "protected" before tab-between-text-entry-points will work. I want to be able to freely edit the actual form, becuase I make frequent changes to them and need full control over things like screen font separate from output (ie: Non-wysiwyg).

Any ideas/input is greatly appreciated.

Thanks!
 04/25/2013 07:58 PM
User is offline View Users Profile Print this message


Mac
Senior Member

Posts: 114
Joined: 01/25/2007

I use emacs regularly (for LaTex documents) and will use DNS with it. I can dictate fine directly in the buffer. I have written some DNS scripts for some things I do in emacs. (I have DNS Pro.) A simple example is "emacs save". The DNS script for this is below:

Sub Main
    SendKeys "^{X}^{S}"
End Sub

You don't say what version of DNS you have in your message or signature footer. You can easily write these kinds of scripts in DNS Pro that will handle emacs commands and text coding that you use frequently.

We don't have DNS's Select-and-Say functions in emacs and (probably) never will. And for some strange reason, sometimes when I begin an utterance in emacs, the first letter of the utterance appears twice.



-------------------------

DNS Pro 13 (32-bit), KnowBrainer 2012, VoicePower, Intel i7-3770K (Ivy Bridge) 8MB L3 cache 3.5-3.9GHz, 16 GB RAM DDR3 1600MHz, 240 GB SSD and 1TB HD, Windows 7 (64-bit), Airline 77 mic (Laptop: Dell Precision M4800, Intel i7-4800MQ @ 2.70 GHz 6 MB Smart Cache, 16 GB RAM, Windows 7, SpeechWare TravelMike)

 04/25/2013 10:06 PM
User is offline View Users Profile Print this message


mdl
Top-Tier Member

Posts: 869
Joined: 04/18/2009

Mac, the doubling character is due to a known DNS/Windows bug:

https://www.knowbrainer.com/forums/forum/messageview.cfm?catid=4&threadid=15820&enterthread=y



 04/25/2013 10:45 PM
User is offline View Users Profile Print this message

Author Icon
dagst47
New Member

Posts: 14
Joined: 04/25/2013

@mac,

I'm using DNS Pro12, Emacs is the most current stable (I believe v.24 something) running on Windows XP. I also use LaTeX quite a bit for longer documents, and may implement that in my current report yasnippets if I can get this task working. 

Can you please share your setup with me? How did you get DNS to work with emacs?? VRmode? Please enlighten me! 

Thanks!!

-D

 04/26/2013 07:49 AM
User is offline View Users Profile Print this message


Mac
Senior Member

Posts: 114
Joined: 01/25/2007

dagst47:

Happy to help. I did nothing to change Emacs related to Dragon. I just dictate into the buffer. When I installed Emacs in 2011, I followed the advice from the following website:

http://www.claremontmckenna.edu/pages/faculty/alee/emacs/emacs.html

You seem to be having a problem dictating into Emacs buffer. Perhaps the first place to start is generally describing what you are trying to do with Emacs and DNS and describe the result. When your cursor is in the buffer and you make an utterance, what happens? Does Dragon work well for you using other applications?

Also, I don't know what VRmode is.

It would help greatly for you to fully describe your hardware, operating system, etc. On this forum, most people put that information in their signature footer that is part of your online profile.



-------------------------

DNS Pro 13 (32-bit), KnowBrainer 2012, VoicePower, Intel i7-3770K (Ivy Bridge) 8MB L3 cache 3.5-3.9GHz, 16 GB RAM DDR3 1600MHz, 240 GB SSD and 1TB HD, Windows 7 (64-bit), Airline 77 mic (Laptop: Dell Precision M4800, Intel i7-4800MQ @ 2.70 GHz 6 MB Smart Cache, 16 GB RAM, Windows 7, SpeechWare TravelMike)



 04/26/2013 10:41 AM
User is offline View Users Profile Print this message

Author Icon
dagst47
New Member

Posts: 14
Joined: 04/25/2013

Thanks Mac!

I will edit my profile shortly with the following info: DNS Pro12, Phillips Powermic III, running on Windows XP (updated to latest SP) via Parallels VM on a 4-core Xexon based MacPro with 12gigs RAM. 

Whenever I dictate into Emacs, Dragon pops up the intermediate "Dictation Box" that contains my utterances- I can then hit transfer and it Does get transferred into the emacs buffer. Unfortunately, that work-flow isn't effective for my needs (described below). 

I have created emacs "skeletons" and "yasnippets" for various reports that I create. These allow me to rapdily generate a report that contains common "default text" which can be changed. I can also change the text of the actual "form" without going though any additional hoops (simply finish the routine and edit the text). Some are relatively complex, using elisp commands to do "if/then" actions on parts of document if certain conditions are met (ex: suppose I'm reporting something with laterality- if string variables for "$left and $right" are equal then replace that text with "bilateral $right"). I don't know how to achieve this in more "standard" word processors such as Word. The goal is speed, and using <tab> (or a programmable mic button) to navigate the document is esstential for me. Using LaTeX as an example (just an example), if I type "8art" <tab> a complete document header for LaTeX-article class is created with all of my preferences, and the cursor is automatically positioned in the "Title" text block. After I change the Title text, I hit <tab> and the cursor moves to the Author field, which is pre-populated with my name. I hit <tab> to accept the default text, and the position of the point (cursor) is moved to the Section field, etc. 

I simply want to replace the "typing" input with "Dictation input". I don't need anything more complex than getting text into the buffer when I dictate it, hitting the mic "forward" button and going to the next text-entry field. Because there are a lot of "smaller" additions/substitutions in my documents, it's simply not time-effective to have to "transfer" everything to the buffer via the intermediate Dictation Box, one piece at a time. Ideally I would talk and it would simply populate the buffer without the intermediate step.

Word <appeared> to have some functionality that worked with old versions of Dragon Medical called "voice-fields" (implemented by creating a template with square brackets around entry points, but I'm not sure that DNS 12 and current Word versions support this feature. Although it's not perfect, this would be a more suitable replacement than DragonPad.

Sorry for the lengthy reply, but hopefully it is more comprehensive. 

Thanks!!

-D

 04/26/2013 11:35 AM
User is offline View Users Profile Print this message


Mac
Senior Member

Posts: 114
Joined: 01/25/2007

First, it sounds like you have the Dragon option turned on to pop up Dictation Box whenever dictating into non-SAPI applications.  I suggest you turn this option off. From Dragon, Tools\Options, in the Miscellaneous tab, uncheck "use the Dictation Box for unsupported applications." After you turn this option off, you will probably be able to dictate directly into your Emacs buffer.

Second, from the workflow you describe,  I suggest you can do this (assuming you turn off the Dictation Box option described above) with a combination of (1) dictating text into your buffer and (2) Dragon scripts that you write. Once you get some experience  with the script syntax, it is straightforward.

If you want to learn about Dragon scripts in detail, I suggest you get Larry Allen's e-book  on the subject.  Scripts are very powerful.



-------------------------

DNS Pro 13 (32-bit), KnowBrainer 2012, VoicePower, Intel i7-3770K (Ivy Bridge) 8MB L3 cache 3.5-3.9GHz, 16 GB RAM DDR3 1600MHz, 240 GB SSD and 1TB HD, Windows 7 (64-bit), Airline 77 mic (Laptop: Dell Precision M4800, Intel i7-4800MQ @ 2.70 GHz 6 MB Smart Cache, 16 GB RAM, Windows 7, SpeechWare TravelMike)

 04/26/2013 12:59 PM
User is offline View Users Profile Print this message


Mac
Senior Member

Posts: 114
Joined: 01/25/2007

@dagst47

Off topic... could you describe a little more how you use Emacs's skeletons and yansippets for LaTex documents? I understand how you use it/them to automate the TeX preamble.

Also, I see that skeletons and yansippets have similar features. Why do you use both rather than one or the other?



-------------------------

DNS Pro 13 (32-bit), KnowBrainer 2012, VoicePower, Intel i7-3770K (Ivy Bridge) 8MB L3 cache 3.5-3.9GHz, 16 GB RAM DDR3 1600MHz, 240 GB SSD and 1TB HD, Windows 7 (64-bit), Airline 77 mic (Laptop: Dell Precision M4800, Intel i7-4800MQ @ 2.70 GHz 6 MB Smart Cache, 16 GB RAM, Windows 7, SpeechWare TravelMike)



 04/26/2013 01:33 PM
User is offline View Users Profile Print this message

Author Icon
dagst47
New Member

Posts: 14
Joined: 04/25/2013

Absolutely-

I'm new to all this, so please don't take my comments as absolute truth- I'm certain that there are people who know much more about it, and I hope they chime in! Here's my take on it:

Skeletons are chunks of elisp, and are evaluated as such. They can (and usually do) contain text of some kind, but you're not really limited in their use. The buffer will simply evaluate the elisp, so you can specify pretty much anything you want. If you have a process that requires flow control, you're probably going to want to use a skeleton instead of a snippet.

YaSnippets are better (IMHO) for most purposes, but if you want to include anything that requires that statements are evaluated as you move through the document (ie: some kind of flow control) they are somewhat limited.

Through some experimentation, I just learned that you CAN treat the snippet tab stops (ie: "$1") like any other string. The problem is that snippets are evaluated once and only once- when they are read initially into the buffer. Therefore, it's harder to say something like "if text A is equal to text B, then do the following..." because the string variable of text A and B are only evaluated when they are read into the buffer. In other words, if you make a change to A or B, their snippet code is Not "re-evaluated" in light of the change. Conversely, skeletons are elisp code that is executed accordigly. One (big) negative consequence of this is that input goes into the mini-buffer, not the main buffer.

One interesting function that I just started playing with is the ability to perform a yasnippet transform upon Exiting a field. I don't know if there is any particular limitation to the types of transforms you can do (I've only made it capitalize stuff). I'm hoping that I can make this work for my purposes by providing a rudimentary flow control within the snippet (eg: tab-stops are visited in numerical order, then you can have it conditionally execute a transform on another part of the document when you exit the tab stop). I'm not sure if that can be done, but that's where I'm trying to go with my report templates.

Hope this helps! And Thank You for the advice on the Dragon Option- although I have not tried it, your input gave me a "palm to face" moment "DOH!". I'm betting that's the problem. 

-D

 04/26/2013 10:10 PM
User is offline View Users Profile Print this message


mdl
Top-Tier Member

Posts: 869
Joined: 04/18/2009

Here is dragon.el, which contains the elisp needed to make Emacs respond correctly to dragon's correction code and to accept non-ASCII characters like ï.

<code>

;;;
;;; dragon.el: code to smooth out the Dragon NaturallySpeaking/Gnuemacs
;;;            interaction
;;;
;;;
;;;     This code does not make Gnuemacs fully select-and-say, but you
;;; will be able to select and correct your dictation to Emacs since
;;; you last issued a voice command or clicked the mouse.  It also
;;; allows you to correctly dictate text containing non-ASCII
;;; characters like accented letters to Emacs.
;;;
;;;
;;; Author:  mdl
;;; Version: 12
;;;

(eval-when-compile
  (require 'pc-select)
  (require 'sgml-mode))
(eval-when-compile
  (if (< emacs-major-version 22)
      (defmacro with-no-warnings (&rest body) (cons 'progn body))))


;;;
;;; Correctly handle Dragon's selection and correction of recently
;;; dictated text via standard Windows keys (e.g., shifted arrow keys,
;;; deleting a selection by a single backspace).
;;;

;;
;; Dragon expects to be able to make Windows-type selections via the
;; shifted arrow keys and then delete them with a single backspace.
;;
;; How to do this depends on the Gnuemacs version:
;;
;;       For recent versions (23+), by default shift arrow keys create an
;;   active region via transient mark mode (on by default).  However,
;;   typing text/backspace does not delete that region unless we turn on
;;   delete-selection-mode.
;;
;;       For earlier versions, turning on PC selection mode enables
;;   shift arrow keys, transient mark mode, and delete-selection-mode.
;;
;; Note: neither of these binds control C to copy, control X to cut,
;; and the like.
;;

(if (>= emacs-major-version 23)
    (delete-selection-mode)
  (progn
    ; don't bind extra PC compatibility keys:
    (setq pc-select-selection-keys-only 1)
    ; as a side effect this makes {ctrl+x}{ctrl+x} deactivate mark:
    (with-no-warnings (pc-selection-mode))))


;;
;; Dragon's correction code occasionally tries to use control C to copy
;; the current selection for some reason (it doesn't appear to ever try
;; and paste it back). 
;;
;; Attempt to tolerate this by making control C a nop when used before
;; the (shifted) left/right arrow keys and backspace.
;;

(dolist (key '([left] [right] [S-left] [S-right]))
  ; bind to control c prefix:
  (define-key mode-specific-map key (lookup-key (current-global-map) key)))
(define-key mode-specific-map [backspace] 'backward-delete-char-untabify)

;
; SGML and derived modes (e.g., HTML mode) define control C <left/right>
; as commands, which interferes with these bindings.
;
; Here we override those bindings to prevent interference with correction.
; If you need those commands, rebind them to other keys.
;
(add-hook 'sgml-mode-hook
      (lambda ()
        (dolist (key '([left] [right] [S-left] [S-right]))
          (define-key sgml-mode-map
        (vconcat [?\C-c] key)
        (lookup-key (current-global-map) key)))
        ))


;;
;; Rebind space to self-insert-command in mini-buffer to avoid confusing
;; Dragon correction routines:
;;
;; (Otherwise, spaces in voice typos get eaten, preventing correct that.)
;;
(define-key minibuffer-local-completion-map " "  'self-insert-command)
(define-key minibuffer-local-completion-map "\t" 'minibuffer-complete)
(define-key minibuffer-local-must-match-map " "  'self-insert-command)
(define-key minibuffer-local-must-match-map "\t" 'minibuffer-complete)


;;
;; Attempt to allow voice editing of interactive search strings:
;;
;; Any attempt to select or correct the search string should cause the string
;; to be edited in the mini-buffer.  "Type" new line to exit with a
;; non-incremental search and line feed to resume the incremental search.
;;
;; Side effect: The left arrow key can no longer be used to implicitly exit
;; from an incremental search.
;;

; We use the following function to get the effect of search-exit-option
; being set to 'edit just for the left arrow key that Dragon uses to
; start selecting a selection:
;
(defun mdl-isearch-other-control-char-with-edit-exit ()
  "\
Behaves like isearch-other-control-char when search-exit-option is
set to 'edit, at least for simple one key functions."
  (interactive)
  (let* ((key (this-command-keys))
     (keylist (listify-key-sequence key)))
    (apply 'isearch-unread keylist)
    (isearch-edit-string)))

; make the (shifted) left arrow key in incremental search mode start
; editing the search string in the mini-buffer before it takes effect:
(define-key isearch-mode-map [left]
    'mdl-isearch-other-control-char-with-edit-exit)



;;;
;;; Allow Dragon to enter non-ASCII characters:
;;;

;;
;;     Dragon attempts to insert non-ASCII characters (e.g., accented
;; letters) using Window's hold down alt key and press 4 numeric
;; keypad digits method.  The following code implements the part of
;; this input method used by Dragon for Gnuemacs.  In particular, it
;; assumes input of the form {alt+NumKey0} {alt+NumKeyA} {alt+NumKeyB}
;; {alt+NumKeyC}, A, B, & C digits, to enter the unicode character
;; with number ABC (in decimal).  E.g., use {alt+NumKey0}
;; {alt+NumKey2} {alt+NumKey3} {alt+NumKey9} to enter an i with 2 dots
;; above it (character number 239).
;;
;;     This code works whether or not Emacs is using the alt key as a
;; meta-modifier (this turns A-kp-0 into M-kp-0, for example).
;;
;;     If you're using an X server, you'll need to make sure that at
;; least the left alt key (the one used by Dragon for inputting
;; characters) is passed to X applications.  For Reflection X, this is
;; settings->keyboard->Alt key reserved for Windows->Left: no check
;; mark.  I recommend passing the right alt key to Windows if possible
;; so that you can use the alt+space menu in macros via
;; {RightAlt+space}.  Unfortunately, the PC version of Gnu emacs
;; doesn't seem to be able to capture only the left alt key.
;;
;;     This code was inspired by code originally written by Jonathan
;; of the VoiceCoders list.
;;

(defun mdl-get-digit (event)
  "Convert events with form M-kp-n or A-kp-n, n in 0..9, to
the integer n.  For other events, returns some number between 0
and 9 inclusive."
  (if (symbolp event)
      (let* ((as-string (symbol-name event))
         (char      (aref as-string (- (length as-string) 1))))
    (if (< char 48)
        0
      (if (< char 58)
          (- char 48)
        0)))
    0))

(defun mdl-handle-alt (prompt)
  "Read next 3 keyboard events and interpret them as alt numpad
digits specifying a character number in decimal.  E.g., M-kp-0
M-kp-6 M-kp-4 yields the character 64 (@)."
  (let ((k1 (mdl-get-digit (read-event)))
    (k2 (mdl-get-digit (read-event)))
    (k3 (mdl-get-digit (read-event))))
    (vector (+ (* k1 100) (* k2 10) k3))
    ))

; handling of translation keymaps was improved in version 23:
(if (>= emacs-major-version 23)
    (progn
      (defvar input-decode-map)
      (define-key input-decode-map [M-kp-0] 'mdl-handle-alt)
      (define-key input-decode-map [A-kp-0] 'mdl-handle-alt))
    (progn
      (define-key function-key-map [M-kp-0] 'mdl-handle-alt)
      (define-key function-key-map [A-kp-0] 'mdl-handle-alt)
      ; function-key-map is only used if no binding is found in the
      ; current keymap; unfortunately, isearch binds everything so we
      ; have to unbind our keys there for our translation to work:
      (define-key isearch-mode-map [M-kp-0] nil)
      (define-key isearch-mode-map [A-kp-0] nil)))
</code>

 

 04/26/2013 10:17 PM
User is offline View Users Profile Print this message


mdl
Top-Tier Member

Posts: 869
Joined: 04/18/2009

I think you will find that Vocola (see vocola.net) is way easier for writing these kind of voice commands then trying to use Advanced Scripting.  For example, your save file script is just:

save file = {ctrl+x}{ctrl+s};

 

[disclaimer: I am the Vocola 2 maintainer]

 

 04/26/2013 11:08 PM
User is offline View Users Profile Print this message

Author Icon
dagst47
New Member

Posts: 14
Joined: 04/25/2013

You, Sir, Are Awesome! THANK YOU!!

-D

 04/27/2013 07:29 AM
User is offline View Users Profile Print this message


Mac
Senior Member

Posts: 114
Joined: 01/25/2007

mdl:

Many thanks for sharing your dragon.el.

It looks interesting.



-------------------------

DNS Pro 13 (32-bit), KnowBrainer 2012, VoicePower, Intel i7-3770K (Ivy Bridge) 8MB L3 cache 3.5-3.9GHz, 16 GB RAM DDR3 1600MHz, 240 GB SSD and 1TB HD, Windows 7 (64-bit), Airline 77 mic (Laptop: Dell Precision M4800, Intel i7-4800MQ @ 2.70 GHz 6 MB Smart Cache, 16 GB RAM, Windows 7, SpeechWare TravelMike)

 04/27/2013 03:49 PM
User is offline View Users Profile Print this message


Mac
Senior Member

Posts: 114
Joined: 01/25/2007

mdl:

I believe that I have dragon.el working. Thanks again.

Question:

After loading dragon.el, the "normal" behavior of marking text and deleting it with the delete key has changed. Previously, I would mark text for deletion and then press the delete key. However, after loading dragon.el, pressing the delete key after marking the text no longer deletes the text. How can I delete the marked text?

I am using GNUEmacs 23.

 

UPDATE: It seems to be C-w after marking a region, but there may be something else that works.

 



-------------------------

DNS Pro 13 (32-bit), KnowBrainer 2012, VoicePower, Intel i7-3770K (Ivy Bridge) 8MB L3 cache 3.5-3.9GHz, 16 GB RAM DDR3 1600MHz, 240 GB SSD and 1TB HD, Windows 7 (64-bit), Airline 77 mic (Laptop: Dell Precision M4800, Intel i7-4800MQ @ 2.70 GHz 6 MB Smart Cache, 16 GB RAM, Windows 7, SpeechWare TravelMike)



 04/25/2013 10:03 PM
User is offline View Users Profile Print this message


mdl
Top-Tier Member

Posts: 869
Joined: 04/18/2009

Emacs is a very powerful editor but it doesn't play particularly well with Microsoft Windows because its user interface predates PCs and because it hasn't been rewritten for Microsoft Windows in particular.  It is possible to make Emacs select-and-say with a fair amount of complexity.  It is also possible to allow just select-and-say for the most recent utterances after your last command.  Even this requires a certain amount of sophistication (editing .emacs files). 

I don't know your technical sophistication level; if it's not reasonably high, I would recommend a different solution.

 

 04/25/2013 10:49 PM
User is offline View Users Profile Print this message

Author Icon
dagst47
New Member

Posts: 14
Joined: 04/25/2013

I use emacs and LaTeX, install .el files, etc without problems, can write short perl scripts etc but I'm not about to pick up and code a new interface in C. If there's a solution out there, technical or not, please post the link or send it to me! 

Regards,

D

 04/30/2013 11:56 AM
User is offline View Users Profile Print this message

Author Icon
dagst47
New Member

Posts: 14
Joined: 04/25/2013

Strange but true- I came into work this morning, fired up emacs v 24.3.1 and DNS 12.x (latest update as of today, I think 12.5) within a Windows 7 environment. I'm suddenly able to "select text" as well as command basic editing without ANY modification at all. This was a completely accidental discovery, as I reflexively issued a command to replace some mis-transcribed text within the emacs buffer. There is no dragon.el installed here, no vr-mode or any other extra .el file installed in my emacs version (except for yasnippet). I simply did M-x text-mode, enabled visual-line-mode (as I usually do) and it worked!
I have no explanation, but I'm very pleased. Considering that I don't need to voice command all the features of emacs, this will likely be a suitable fix for me (whatever "it" was!).
UNchecking the Misc Option to "use dictation box for unsupported applications" was absolutely key. Thanks again.
-D
 04/30/2013 12:13 PM
User is offline View Users Profile Print this message

Author Icon
dagst47
New Member

Posts: 14
Joined: 04/25/2013

As an aside, I wonder if it's because I enabled CUA mode in my current emacs session? Maybe someone else can verify, but it's working beautifully now and I don't want to change anything!

 04/30/2013 01:52 PM
User is offline View Users Profile Print this message


mdl
Top-Tier Member

Posts: 869
Joined: 04/18/2009

Mac: delete key does cut the currently active region. If you don't see highlighting, the current region is not active.
 04/30/2013 01:55 PM
User is offline View Users Profile Print this message


mdl
Top-Tier Member

Posts: 869
Joined: 04/18/2009

dragon.el partly implements CUA mode; it also helps that Emacs has moved the defaults towards Windows (e.g., transient mark mode is now on by default) in recent versions.

note however that you will only be able to select and correct recent utterances without vr-mode or VoiceCode.
 04/30/2013 04:50 PM
User is offline View Users Profile Print this message

Author Icon
dagst47
New Member

Posts: 14
Joined: 04/25/2013

Ah, yeah, I see it in action now. I can't correct more than the most recent utterance. Still, this is a huge step in the right direction. Capitals are acting funny too, probably for the same reason (doesn't recognize the prior period if that sentence wasn't in the same utterance).

 01/22/2016 04:46 PM
User is offline View Users Profile Print this message

Author Icon
ben_west
New Member

Posts: 14
Joined: 05/18/2015

I wanted to resurrect this thread to see if it's possible to use DNS for Emacs with DNS version 13. I tried the above script and can't get select-and-say to work; reading the code, it seems like the relevant command is `delete-selection-mode`. This command runs fine for me but I still can't correct my most recent utterance. Has anyone gotten Emacs to work with DNS 13?

-------------------------

Dragon professional 15 at work; Dragon Medical at home

 01/22/2016 08:21 PM
User is offline View Users Profile Print this message


mdl
Top-Tier Member

Posts: 869
Joined: 04/18/2009

Nuance in their wisdom decided to remove BasicTextControl, which is what they call the ability to use Select-and-Say On recent utterances, for nonstandard applications in DNS 13. I'm working on a workaround to restore this functionality; working pretty well so far. if you don't mind trying out Alpha code, send me a message with your email.
 01/23/2016 01:44 AM
User is offline View Users Profile Print this message


rvsw
Top-Tier Member

Posts: 240
Joined: 02/12/2011

Here is a YouTube video for a person who has been using Dragon to code in Python using Emacs and VI. I'm still trying to understand it.
https://www.youtube.com/watch?v=8SkdfdXWYaI. I'm working to be able to adapt it for C programming.



-------------------------

Using Dragon NaturallySpeaking premium version 13 with knowbrainer 2017 on Windows 7 machine with Microsoft Office version 2010



 01/23/2016 10:48 PM
User is offline View Users Profile Print this message


mdl
Top-Tier Member

Posts: 869
Joined: 04/18/2009

rvsw, check out the programming by voice FAQ @ http://vocola.net/programming-by-voice-FAQ.html  



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

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