Last Modified: February 24, 2001
In order to install and use NatLink, you need to have the following software installed.
In addition, if you want to recompile the NatLink C++ programs you will need the following software. Recompiling the NatLink C++ programs is not required in order to use NatLink.
- Microsoft Visual C++ version 6.0.
To install NatLink follow these instructions.
- Download the latest version of NatLink. You can find a link to the latest version from the page NatLink Versions.
- Unpack the natlink.zip archive into a subdirectory, for example c:\NatLink. When unpacking the archive, make sure you preserve the subdirectories inside the archive.
- Run the program c:\NatLink\MacroSystem\EnableNL.exe.
This program will display a dialog box which lists every version of Dragon NaturallySpeaking which is installed on your system. (It may also list versions of Dragon NaturallySpeaking which you no longer have, but which are still listed in the registry.) EnableNL also lists the version of Python you are currently running as a double check.
If you want to enable Python macros from within Dragon NaturallySpeaking then set the check box for the appropriate versions of Dragon NaturallySpeaking. You do not have to set this check box if you only want to use NatLink to control Dragon NaturallySpeaking. If you have multiple versions of Dragon NaturallySpeaking installed, you can enable NatLink for any or all of those versions of NatSpeak.
In the event that your copy of Dragon NaturallySpeaking becomes unstable or unusable and you suspect that the NatLink subsystem may be at fault, you can disable the loading of NatLink by Dragon NaturallySpeaking by running EnableNL again and clearing the check box.
Click OK to finish the setup of NatLink (even if you did not set the check box).
EnableNL creates the necessary registry entries to allow Python to see NatLink and to allow Dragon NaturallySpeaking to see NatLink. The source code of EnableNL is included in the NatLink distribution if you want to examine EnableNL in more detail.
Support for Multiple Python Versions
All of the NatLink Python files will run under either Python 1.5.2 or Python 2.0 without modification. However, C++ extension modules must be compiled against specific versions of Python. Therefore, I have created two versions of each extension module, one for Python 1.5.2 and one for Python 2.0.
The file Natlink\NatlinkSource\natlink15.dsw is a Microsoft Visual C++ workspace that builds NatLink\MacroSystem\natlink15.dll. This version of the DLL is linked against Python 1.5.2 libraries. Likewise, the workspace natlink20.dsw builds natlink20.dll, which is linked against the Python 2.0 libraries.
When you run EnableNL.exe, it attempts to determine what version of Python you are running. If EnableNL thinks that you are running Python 1.5.2 then EnableNL makes a copy of natlink15.dll and stores it as NatLink\MacroSystem\natlink.dll. Likewise, if EnableNL thinks that you are running Python 2.0, it copies natlink20.dll into natlink.dll.
The same scheme is used for mobiletools (mobiletools15.dll or mobiletools20.dll is copied into mobiletools.dll).
It is unlikely, but possible, that EnableNL incorrectly decides that you are using Python 2.0 when you are using Python 1.5.2 (or visa-versa). Check the Python version detected when you run EnableNL to be sure. If EnableNL makes a mistake, you can hand copy the correct version of natlinkXX.dll into natlink.dll.
Running the Natlink Selftest (not recommended)
I have included a selftest suite for NatLink in the package. I do not recommend that you try the selftest suite. The selftest suite is picky about your system configuration and it does not work at all under version 5.0 of Dragon NaturallySpeaking. However, if you want to try the selftest suite, follow these instructions.
If the selftest does not work, do not panic. Your NatLink installation probably works fine. Just write a macro file and see if it is recognized.
- Start Dragon NaturallySpeaking 4.0 US English, wait for the Dragon NaturallySpeaking window to appear.
- Turn off NaturalText (that light blue bubble in the tray should be grey).
- Start the Python command line (from the Start Menu).
- In the Python window type:
After a few seconds, you should see the string "All tests passed!" (If you do not see this line, go to the Python window and look at the error message which was printed. Then see if you can puzzle out what went wrong.)
If testnatlink runs to completion then NatLink should be ready to be used. The following pages describe the NatLink distribution and how to use NatLink.
- Shutdown Dragon NaturallySpeaking and restart it. Do not save your speech files after running testnatlink or it will create extra words in your vocabulary which will cause subsiquent runs of testnatlink to fail.
This web page (http://www.synapseadaptive.com/joel/NatLinkInstallation.html) was last modified on February 24, 2001.
The contents of this page are (c) Copyright 1998-1999 by Joel Gould. All Rights Reserved.
See Copyright Information for more details.