Joel Gould NaturallySpeaking Unofficial Information Pages
The Insider's Guide to Dragon NaturallySpeaking by Joel Gould
 Introduction
 Latest Product News
 Guide To Products
 Product Features
 Frequently Asked Questions
 Getting Best Performance
 Python Macro System
    Intro To Python
    Intro To NatSpeak
    NatLink Copyright
->     NatLink Installation
    NatLink Versions
    NatLink Contents
    Writing Python Macros
    Controlling NatSpeak
    Speech Enabled Python
    NatLink Support
 

NatLink Installation

Last Modified: February 24, 2001

System Requirements

In order to install and use NatLink, you need to have the following software installed.

  • Windows 95, Windows 98, Windows NT 4.0 or Windows 2000.
  • Dragon NaturallySpeaking. NatLink should work with any edition of Dragon NaturallySpeaking. Some features of NatLink may not work with versions of Dragon NaturallySpeaking prior to version 3.0.
  • Software which allows you to decompress ZIP archives. For example, WinZip 6.3.
  • Python version 1.5.2 or Python version 2.0.

    You can download Python for Windows from http://www.python.org/. (Or you can use the ActiveState version). You need to download and install Python before using NatLink. You do not need to install Tcl/Tk (an optional part of the Python installation). You also do not need to install any PythonWin (win32) extensions or any other extensions to Python which are not part of the standard distribution.

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.

Installation Instructions

To install NatLink follow these instructions.

  1. Download the latest version of NatLink. You can find a link to the latest version from the page NatLink Versions.

  2. 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.

  3. 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.

  1. Start Dragon NaturallySpeaking 4.0 US English, wait for the Dragon NaturallySpeaking window to appear.

  2. Turn off NaturalText (that light blue bubble in the tray should be grey).

  3. Start the Python command line (from the Start Menu).

  4. In the Python window type:
      import testnatlink
      testnatlink.run()
    

    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.

  5. 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.

Web page hosting graciously provided by
Synapse, a provider of speech recognition solutions.