简体   繁体   中英

Problems using python dragonfly on linux bases machine

I am playing with the Dragonfly lib in python. I am working on Mac OSX, and this will be my target platform. However when try to run my program I receive the following error:

Traceback (most recent call last):
  File "clock_challenge.py", line 2, in <module>
    from dragonfly.all import Grammar,CompoundRule
  File "/Users/vikash/.virtualenv/clock_challenge/lib/python2.7/site-packages/dragonfly-0.6.5-py2.7.egg/dragonfly/__init__.py", line 22, in <module>
from .log               import get_log
  File "/Users/vikash/.virtualenv/clock_challenge/lib/python2.7/site-packages/dragonfly-0.6.5-py2.7.egg/dragonfly/log.py", line 30, in <module>
    import win32gui
ImportError: No module named win32gui

How can I get around using the win32gui library, since my target platform is Linux based?

That package is only available for Windows. Without lots of code changes you won't be able to use it on another OS.

Dragonfly has historically (t4ngo/dragonfly) been windows only. Regardless of what platform you're running on you should install dragonfly outside of virtualenv.

I recommend using Danesprite fork of dragonfly which is integrating fixes from the community and expanding on features. With this fork you can use alternate speech recognition engines (CMU Pocket Sphinx) and (soon Google Speech API) on Linux. Dragon NaturallySpeaking Speech recognition engine still only works on Windows. Hopefully these enhancement will be pulled into into the main promoted repository t4ngo/dragonfly someday.

We have not tested on Mac OSX so open up a issue if you run and problems.

You can use aenea ( https://github.com/dictation-toolbox/aenea ) to control a Linux or possibly OS X target, communicating with Dragonfly & Dragon on a separate Windows machine (eg: a Windows VM running on top of Linux).

The hope is that eventually, there will be a cross-platform speech recognition engine that is as useful as Dragon, but this is likely to take some years.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM