NatLink Python 2.5, enable.py, Windows Explorer module, quick_*

I've released a version of NatLink built against Python 2.5 that includes a new commandline script to enable/disable NatLink. The package is a bare-bones NatLink zip archive without any of the NatLink extension modules; however, the documentation page for the package includes a link to the full installation directions for Vocola for folks that are interested in adding it.

The enable script, which is also available separately from the NatLink archive, automates the process of adding/removing the appropriate NatLink config entries in the Windows registry and NaturallySpeaking configuration files. It is not an installer; think of it more as a much needed replacement for EnableNL. The script is profusely documented if you are curious about the voodoo that makes Python talk to NatLink talk to NaturallySpeaking.

I've tested the enable script against Python 2.3 and 2.5 and Dragon versions 8 and 9.5; it should also work with Dragon 7 (and perhaps even 6 and some versions in the 5 series). Given the enormous variety of software installations out there, I will not be surprised if there are some setups for which this script doesn't work. Let me know if you find such a configuration and I will update the script as time allows.

Re: Dragon 10: I am not impressed with Dragon 9.5 nor with Nuance(*) and it is extremely unlikely that I will pay for another Dragon "upgrade." If someone else wants to make the script work with 10 they are welcome to take a crack at it and I'll be happy to post the updates.

Further details and the downloads are available here: http://www.westga.edu/~drocco/voice/NatLink/

While we're at it, I've also created a NatLink module that dynamically voice enables Windows Explorer by pulling the list of files for the active Explorer window from the shell object. The module allows you to say all or part of a folder name to change to that folder. You can also open files with the command "Open <all/part filename>."

I'll warn you that the module is a glorified proof of concept: the code is a mess for which I apologize. However I'd rather give folks the opportunity to use it as is if they like rather than waiting until it's "perfect" to release it. I'm in the process of refactoring the module and adding some new features and will post when it is complete.

Further details and the download are available here: http://www.westga.edu/~drocco/voice/explorer/

Finally, take a look at this handy utility for accessing frequently used files/folders/URLs and the Windows list of recently used files and folders: http://www.westga.edu/~drocco/voice/quick_files/

-----

(*) the irony of their name just kills me: I'm fairly certain they are the least nuanced company I've ever dealt with

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hello, I am glad and

Hello,

I am glad and suprised at the same time. Did you follow the discussions on a new natlink/vocola/unimacro installer?

Could we combine efforts and see how we can get that unstaller work with python 2.4 and 2.5.

Your idea of catching the files in the explorer looks smart and promising. Maybe that can also be incorporated in unimacro.

Please consult http://qh.antenna.nl/unimacro.

Greetings, Quintijn

WOW! If only half of what

WOW! If only half of what you describe works, it still represents a major contribution!

I wonder why you disapprove of DNS 9.5? It works super for me and most folks.

Again, thanks and congratulations!

Bruce

thanks

Thanks for your kind words; I'm glad that the software will be useful to other folks.

As for DNS 9.5, it would take me much longer than I have right now to give you a good answer. Briefly, the thrust of my answer is that Nuance doesn't seem to care about its users: each new DNS version brings a hefty price tag, outlandish and dubious performance claims, and reductions in the software's functionality. Examples of these reductions include the well-known command sequences problem and DNS 9.5's bizarre tendency to non-deterministically ignore word spacing properties in non-Select and Say windows (e.g. DNS inserted a space before the "thanks" in the subject text box for this message which I had to remove). Nuance's decision to use their "update manager" as a shill to pimp their other software products is sleazy, unethical, and doubly aggravating in light of the pitiful support they offer for the software I've already paid for.

drocco, drocco

drocco,

drocco wrote:

Thanks for your kind words; I'm glad that the software will be useful to other folks.

Its well deserved. I hope the community continues to deserve your attentions and contributions!

Your objections make a lot of sense from that perspective of a Vocola user, but I am forced to point out for the sake of argument out a certain amount of justice on the side of Nuance in these matters.

Quote:

Examples of these reductions include the well-known command sequences problem

Strictly speaking Nuance has no obligation to maintain compatibility with other software, especially when that software competes with one of its own profit generating softwares. And especially when this particular capability gives the competing freeware product more functionality than Nuance's own software!

Quote:

DNS 9.5's bizarre tendency to non-deterministically ignore word spacing properties in non-Select and Say windows (e.g. DNS inserted a space before the "thanks" in the subject text box for this message which I had to remove).

The defense Nuance's exponents have cited in these cases is that maintaining text compatibility with software that is not compliant with Microsoft's standards is not their problem. Others have suggested that Nuance has systematically crippled DNS' previous Natural Text capabilities for unknown reasons, although possibly as a concession to Microsoft. It might also be that the cost of NatText is a deterrent. In any case, why they would continue to do this instead of attempting to reestablish this capability is puzzling -- scarcely a way to retain the loyalty of old user's and attract that of new ones.

Quote:

Nuance's decision to use their "update manager" as a shill to pimp their other software products is sleazy, unethical, and doubly aggravating in light of the pitiful support they offer for the software I've already paid for.

Right on! Just because other major software makers, like Adobe and Quicken, do this does not justify the perpetuation of an abuse. I could understand leaving in a nag like that to harass newbies, but why keep insulting long-term users by not letting them turn off such a nag? To me it's the opposite of an effective technique for developing user loyalty.

Bruce

drocco wrote: Examples of

drocco wrote:

Examples of these reductions include the well-known command sequences problem

You should study your resources better.

The command sequences, which was an option of vocola, in order to dictate in one phrase more commands, has for a long time been criticised. Like the _anything rule, which catches any dictation, these are too rough mechanisms to include in a simple commands system like vocola.

1. Doing a sequence of commands in one phrase is used with care in some grammars of unimacro eg. the _keystrokes grammar, and in exclusive mode in the _repeat grammar.

2. The _anything rule should only be used after specific command words, in cases like "search google for _anything". It seems by the way NatSpeak 10 adopted this trick!

Please also answer my earlier message, with questions about your duplicating work, because a new installer was already there! And how about the maintenance of the SVN repository??

Greetings, Quintijn

sequences and novelty

Quote:

The command sequences, which was an option of vocola, ...

The command sequence behavior is a symptom of a particular degradation in DNS functionality—handling of recursive grammars—that started in version 7 and deteriorated in 8 and subsequent versions. The fact that this functionality reduction affects Vocola is entirely beside the point: the problem could just as easily be demonstrated with a NatLink script, a C# program, or possibly even a DNS Pro macro. Bruce makes an excellent point above when he asserts that Nuance is under no obligation to continue supporting particular features in subsequent Dragon versions. However, I would counter that the behavior of Dragon versions 7+ when fed valid, legal input in the form of a recursive grammar constitutes nothing less than a serious software defect. No one would accept a keyboard or mouse that froze their system given legal input, even if that input was entered infrequently. It is beyond my comprehension that those of us for whom voice-recognition is our keyboard and mouse are expected to blithely accept such behavior from Dragon. If Nuance intended to discontinue support for this feature, they could easily have made Dragon issue deprecation warnings or reject such grammars entirely. Again, this is but one small point among many issues that Nuance seems content to leave unresolved.

While you are welcome to invest your resources however you see fit, personally I am not in the habit of paying more money for less robust, less functional, and less supported software.

Quote:

Please also answer my earlier message, with questions about your duplicating work...

I see no duplication of effort because I see minimal overlap between these modules and what was previously available:

  • the Explorer module is completely novel
  • I am unaware of any existing stable releases of NatLink for Python 2.5
  • quick_* provides access to the Windows recently used files and folders, which is also unique as far as I am aware
  • the enable script is the only one I know of that meets all of the following:
    • works on recent versions of DNS
    • Python solution with minimal external dependencies and no required modifications to existing NatLink installations
    • heavily documented with doctests to demonstrate usage and verify correct behavior
    • NatLink only: does not install any new extra modules or other third-party software

The licensing terms permit you to incorporate these modules into other software if you wish, assuming proper attribution and that you are not exploiting the software for commercial advantage. (NatLink, of course, is an exception; its license status is unclear to me).

I released the software with the hope that it would be helpful to others; if even a small number of users find the software or the ideas they embody helpful, I am content.

drocco wrote: While you are

drocco wrote:

While you are welcome to invest your resources however you see fit, personally I am not in the habit of paying more money for less robust, less functional, and less supported software.

Quote:

I released the software with the hope that it would be helpful to others; if even a small number of users find the software or the ideas they embody helpful, I am content.

drocco,

I agree that Nuance, in pursuing penny-wisdom, is proving to be pound-foolish. I would hope for its sake it begins to think about users as a genuine community with a collective memory and a multiplicity of interests and needs. I don't think restoring much of the functionality it has begun stripping out of the product would cost it significant profit, while it has the opportunity to increase its sales and loyalty considerably. That arch villain, M$, has successfully begun courting many power users and potential developers by its pro-active user orientation. Its hard to believe Nuance is going to frivol away its huge good will investment by continuing to pursue the opposite policy. Its as if they are signaling that they have already conceded the desktop market and by mopping up petty profits here and there. What a shame that such a grand tradition and product seem destined to end so cheaply!

Bruce

I am sorry that Nuance has

I am sorry that Nuance has become so petty and uncaring of their customers.

Due to various problems I had with my computer since I purchased PDF Converter 4, including wipeout of hard disks, I was unable to uninstall and reinstall, thus getting the benefit of the activations. After I exceeded the limit of activations, I had to go on my bended knees to Nuance to get another one. With the latest problem, which happened within the last few days, they refused point-blank to give me another activation. Despite my pleas, and pointing out that there is nothing in the terms and conditions of sale at the point of purchase referring to activations, they still would not give in, and told me I would have to purchase another licence by means of a complete new purchase of the programme.

In fact they have no legal entitlement to even impose activations. This is because at the time of the contract of purchase, there is no precondition specified anywhere on the Nuance site available to a purchaser specifying that activations are necessary. The first time that this comes to the attention of a purchaser is on installing, reference is made to it near the end of the "ScanSoft PDF Professional ReadMe" that appears just under the install button. At that stage the contract is closed, and Nuance is attempting to impose post-contractual terms to an existing closed contract.

I warned them that I would make known their attitude on the widest possible scale.

I'm presently contemplating legal action to enforce the contract and force them to either drop the activation requirement, or give me the number of activations that I would require now or in the future.

The only thing that is causing me to contemplate is the cost to me of the enforcement, compared to purchasing the latest version of PDF Converter 5, concerning which I have read (possibly on this site or another one) that it has glitches.

If I could avoid purchasing anything further from Nuance I would.

Just thought I'd let you know what I think of Nuance.

Quentin

admin's picture

BruceCyr wrote: That arch

BruceCyr wrote:

That arch villain, M$, has successfully begun courting many power users and potential developers by its pro-active user orientation.

A very good example is that Microsoft opened it's SR staff to the users. They are available via their own private blogs, this forum as well as others. They went to those power users and vendors of Dragon and whatever else and found out what those users want. How should it work? It appears, in this regard, their employees can ask questions and give an official stance without fear of reprisal.

Nuance on the other hand seems quite the opposite. When was the last time a Nuance employee contacted you, and you knew they were a Nuance employee, to ask your opinion on features for any Nuance product? Closed tower from what I've seen/read.

I think it would be a great benefit to Nuance and their users for Nuance to open themselves up to their users. That is what would help create loyalty and a comfortable feeling with their products. It just seems that more and more I'm reading messages on various forums that users are more and more unhappy with some of Nuance's policies.

I hope that all made sense. I don't intend it to deride Nuance, but to point out they need to realize they sell to people and not numbers. Those people have needs and desires and it would be nice if Nuance were able to meet them. Unhappy customers/users will vote with their feet and by the time it's realized, it may be too late.

My last 2 cents worth. Laughing out loud
Skip

yes. I completely agree that

yes. I completely agree that nuance should open up the API. Joel Gould exposed a lot, but certainly a lot must've changed in the intervening years. If only they had not tied MS speech recognition so closely to Vista, then I think it would have been spared the Vista guilt by association.

I only hope that MS continues development of its speech recognition products and its encouragement of outside developers.

drocco wrote: The command

drocco wrote:

The command sequence behavior is a symptom of a particular degradation in DNS functionality—handling of recursive grammars—that started in version 7 and deteriorated in 8 and subsequent versions. The fact that this functionality reduction affects Vocola is entirely beside the point: the problem could just as easily be demonstrated with a NatLink script, a C# program, or possibly even a DNS Pro macro. Bruce makes an excellent point above when he asserts that Nuance is under no obligation to continue supporting particular features in subsequent Dragon versions. However, I would counter that the behavior of Dragon versions 7+ when fed valid, legal input in the form of a recursive grammar constitutes nothing less than a serious software defect. No one would accept a keyboard or mouse that froze their system given legal input, even if that input was entered infrequently. It is beyond my comprehension that those of us for whom voice-recognition is our keyboard and mouse are expected to blithely accept such behavior from Dragon. If Nuance intended to discontinue support for this feature, they could easily have made Dragon issue deprecation warnings or reject such grammars entirely. Again, this is but one small point among many issues that Nuance seems content to leave unresolved.

While you are welcome to invest your resources however you see fit, personally I am not in the habit of paying more money for less robust, less functional, and less supported software....

Drocco, I do not know who you are, how long you work with speech recognition, how long you work with natlink. But I do not like your comments about this at all. Note natlink is on an unofficial development, which we are glad it still works with version 9, and possibly with version 10. Note also recursive grammars work, as I pointed out. But I had several grammars indeed in one of the previous versions, which did not work/recognize as expected. For these grammars I had to try different ways of defining them. For example the grammar _keystrokes was set up very carefully in order to support the recursiveness. But it still works.

Quote:

I see no duplication of effort because I see minimal overlap between these modules and what was previously available:

  • the Explorer module is completely novel
  • I am unaware of any existing stable releases of NatLink for Python 2.5
  • quick_* provides access to the Windows recently used files and folders, which is also unique as far as I am aware
  • the enable script is the only one I know of that meets all of the following:
    • works on recent versions of DNS
    • Python solution with minimal external dependencies and no required modifications to existing NatLink installations
    • heavily documented with doctests to demonstrate usage and verify correct behavior
    • NatLink only: does not install any new extra modules or other third-party software

The licensing terms permit you to incorporate these modules into other software if you wish, assuming proper attribution and that you are not exploiting the software for commercial advantage. (NatLink, of course, is an exception; its license status is unclear to me).

I released the software with the hope that it would be helpful to others; if even a small number of users find the software or the ideas they embody helpful, I am content.

You have the fullest rights to do this as you did. And the grammars you added novel, and probably smart. And you are the first to make natlink work with Python 2.5.

What I am saying is that you are off the subversion files on sourceforge now. That there is now a split effort on the installation modules of natlink. And that my recent installer works on recent versions of DNS, works python only, has several unittests, can be used without vocola, unimacro, and doesn't need third-party software.

And that there are probably (small) improvements in the natlinkmain and natlinkutils code which you'll miss by taking an older track.

So why did you duplicate this work I did about half a year ago. Why didn't you decide to spend your effort in getting the existing installer work with Python 2.5?

Why don't you volunteer to participate in the mainstream development of natlink?

Greetings, Quintijn

Let me weigh in here, since

Let me weigh in here, since I have been experimenting with both Quintijn's product and drocco's.

1. the great value of drocco's work is that he has explained, in a clear step-by-step manner, how the installation of natlink works. In fact, you can even do it by hand, without running his enable.py code, which is extraordinarily well-written and easy to understand.

2. Another good thing about drocco's work is that, if you, like me, have spent years hacking at the code in macroSystem/core including various experimental versions of vocola, then you can certainly appreciate not having to re-do all the changes since Quintijn's installer moves a lot of code around and in fact make certain intimate changes in the material in macroSystem. Now, don't get me wrong! The changes that have been made there certainly help the entire system work better, but in my case, I have already made my peace with my own changes, and am happy with the way things are for me. Note that One of the most important changes that Quintijn has made with respect to Vocola is to remove the dependence of simpscrp.pyd by using the os.system call.

3. Actually, Quintijn's installer does include a python 2.5 dll (or pyd). I have gotten it to work on certain of my systems, but since I contributed the original Python 2.5 dll, it might be just me. So far, no one else has verified that this works on windows XP. I suspect there may be special problems with Windows Vista ( which I don't have access to).

In summary, Quintijn's installer is great for a first-time install and provides a lot of stuff to help you get started right away since it includes Vocola and unimacro. However, if you have already been tweaking stuff yourself, and need Python 2.5, then drocco's explanation and the ability to do a very "thin" install without changing anything in the macroSystem directory is very nice indeed. Note that you do need to know a few more things about how to work with Python using drocco's work since Quintijn provides an easy-to-understand GUI.

Just my $0.02.

Just tried the explorer

Just tried the explorer add-on and got the following error:

Traceback (most recent call last):
File "C:\PROGRA~1\NatLink\macrosystem\core\natlinkutils.py", line 202, in beginCallback
self.callIfExists( "gotBegin", (moduleInfo,) )
File "C:\PROGRA~1\NatLink\macrosystem\core\natlinkutils.py", line 213, in callIfExists
else: apply(func, argList)
File "C:\PROGRA~1\NatLink\macrosystem\explorer.py", line 99, in gotBegin
self.folders, self.files =getFolderFileNames(shellWindow,FOLDER_SIZE_LIMIT)
File "C:\PROGRA~1\NatLink\macrosystem\explorer.py", line 281, in getFolderFileNames
folderItems=window.document.Folder.Items()
File "C:\Python23\lib\site-packages\win32com\client\__init__.py", line 454, in __getattr__
raise AttributeError, "'%s' object has no attribute '%s'" % (repr(self), attr)
AttributeError: '' object has no attribute 'document'
Traceback (most recent call last):
File "C:\PROGRA~1\NatLink\macrosystem\core\natlinkutils.py", line 202, in beginCallback
self.callIfExists( "gotBegin", (moduleInfo,) )
File "C:\PROGRA~1\NatLink\macrosystem\core\natlinkutils.py", line 213, in callIfExists
else: apply(func, argList)
File "C:\PROGRA~1\NatLink\macrosystem\explorer.py", line 99, in gotBegin
self.folders, self.files =getFolderFileNames(shellWindow,FOLDER_SIZE_LIMIT)
File "C:\PROGRA~1\NatLink\macrosystem\explorer.py", line 281, in getFolderFileNames
folderItems=window.document.Folder.Items()
File "C:\Python23\lib\site-packages\win32com\client\__init__.py", line 454, in __getattr__
raise AttributeError, "'%s' object has no attribute '%s'" % (repr(self), attr)
AttributeError: '' object has no attribute 'document'

Any clue ?
Thanks,

John

Need more information

John: the Explorer module is highly context-sensitive, so I'll need a bunch of additional information to be able to track down the problem. Please email me directly and include the following information:

  • Windows version and service pack level
  • DNS version
  • Python/Python for Windows extensions versions
  • The directory you were looking at and its contents
  • What you said that triggered the error

thanks,
dan

great job! With respect to

great job!

With respect to natlink, what is the advantage of Python 2.5 over Python 2.3?

great job! I second that

drocco,
thank you so much for putting these things together. I especially liked the file navigation capability. I have noticed that it is quite slow, and it really slowed down my explorer, so I had to remove the macro.

If you ever create a faster version I will be sure to use it immediately!
Jeff
http://agileconsulting.blogspot.com

thanks, Jeff! Could you

thanks, Jeff! Could you tell me what your environment is like (OS, RAM, CPU, DNS)? Does the slowness seem to be caused by excessive swapping/disk usage? Are there certain folders that are significantly better or worse?

If you are feeling adventurous, you might try tweaking the FOLDER_SIZE_LIMIT variable to something small (say 20) and see if that helps.
Thanks,
dan

Thank you for your gracious

Thank you for your gracious and thoughtful comments here and above.

Python 2.3 was released quite a while ago and most of the community has moved to later versions. I'd say most of the value stems from being current, which gives you access to the accumulated bug fixes, performance improvements, and community support and extensions in the more recent versions of the language . There have also been some significant changes to the language and module library. A good example is the doctest module, which saw significant changes in Python 2.4; it is a wonderful tool for easily testing modules and providing precise usage documentation for methods. Finally, updating to 2.5 should ease the transition to Python 3.0, which is due to be released in early October.
dan

Compatible version of vocola simpscrp available

In order to get this python 2.5 version working with vocola, you might need the following file:

http://drop.io/simpscrp

I had to rebuild it from the vocola 2.6 source and build the Python 2.5 from source, also. Not difficult, just time-consuming.

Installing vocola

How did you manage to install Vocola. There is no Natlink\MacroSystem\core directory to put VocolaUtils.py in.

I have tried putting VocolaUtils in Natlink\MacroSystem and putting you simpscrp version in Natlink\Vocola\Exec\2.5
but got the following error message when Dragon starts :

Initializing NatLink Macro System
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
Error loading _vocola_main from C:\Program Files\NatLink\MacroSystem\_vocola_main.py
Traceback (most recent call last):
  File "C:\Program Files\NatLink\MacroSystem\natlinkmain.py", line 138, in loadFile
    imp.load_module(modName,fndFile,fndName,fndDesc)
  File "C:\Program Files\NatLink\MacroSystem\_vocola_main.py", line 49, in <module>
    import simpscrp
ImportError: DLL load failed: The specified module cannot be found.

any clue ?

can u import simpscrp from a

can u import simpscrp from a plain python interpreter?

It seems like simpscrp is not in the PYTHONPATH.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.


Syndicate content