Danesprite on master
Remove unnecessary install requ… (compare)
Danesprite on major
Remove multiple engine options … Remove the dragonfly.util sub-p… Make dragonfly.accessibility su… (compare)
Danesprite on master
Clarify sections of the documen… (compare)
Danesprite on major
Remove dragonfly.rpc sub-packag… (compare)
Danesprite on master
Update sections of the document… (compare)
Danesprite on master
Remove unused test suite module (compare)
Danesprite on minor
Fix Kaldi marking of whether re… Add Kaldi optional local or onl… Update Kaldi version, to fix er… and 32 more (compare)
Danesprite on major
Remove training mode from the S… Remove built-in sleep/wake mode… (compare)
Danesprite on talon-dev
Danesprite on master
Add missing documentation file … (compare)
Danesprite on 0.35.0
Danesprite on master
Update changelog Update to version 0.35.0 Pleas… (compare)
@westocl No problem, glad I could help.
It is a nice thought, but Dragonfly would not work correctly with Pyodide at all. Many components would be broken by such an environment, the most important being the libraries used for audio input and speech recognition. These libraries (e.g., Natlink) would need to be compiled specially. Aside from that, IPC with Dragon (or WSR) would be made impossible and interaction with the OS severely limited by the "sandboxing" of the browser.
enable numbers
and it started working again. Probably a caster bug
Hi @droundy , yes I put a hook to listen for keyboard events. I'm using Kaldi backend, so I put this at the bottom of my existing _dictation_mode.py
file (that you can see at "https://github.com/Danesprite/dictation-mode-grammar/blob/master/_dictation_mode.py"):
import threading
# A thread function callback that is blocking
def threadfunc_setupHotkeysForDictationModes_blocking(arg):
from pynput import keyboard
print("Waiting in the background for global hotkeys that switch dictation modes ...")
# This function is unused because we use on_press & on_release directly. But it's left here for compilation purposes
def on_activate():
print('Global dictation-mode hotkey activated!')
def key_pressed(a):
#print('key pressed!', a)
# If the user is holding down the NumLock key, switch to Dictation mode.
if a == keyboard.Key.num_lock:
print('Global dictation-mode hotkey pressed!', a)
grammar.status = 2 # Dictation-only mode
def key_released(a):
#print('key released!', a)
# If the user released the NumLock key, switch back to Command mode.
if a == keyboard.Key.num_lock:
print('Global dictation-mode hotkey released!', a)
grammar.status = 0 # Command-only mode
with keyboard.Listener(
on_press=key_pressed,
on_release=key_released) as h:
h.join()
# Setup event handlers for a few global hot keys, so the user can easily switch between Dictation vs Command mode.
# This function is non-blocking
def setupHotkeysForDictationModes():
mythread = threading.Thread(target = threadfunc_setupHotkeysForDictationModes_blocking, args = (0,))
mythread.daemon = True # Don't block the parent thread from terminating when desired.
mythread.start()
# Allow switching dictation mode
setupHotkeysForDictationModes()
This script creates a background thread to always listen for the numlock key going up or down. It's not "polling", most of the time this thread will be asleep, the pynput
library wakes up this thread whenever any key is pressed on any "keyboard" attached to your computer (including USB foot pedals!). I then configured one of my footswitch pedals to be a NumLock key. eg:
sudo ./footswitch -1 -k numlock -2 -k F24 -3 -k scrollock # Pedal 1 = NumLock, Pedal 2 = media_play_pause/F24, Pedal 3 = ScrollLock
This message is replying to a Matrix event but we were unable to find associated bridged Gitter message to put it in the appropriate threaded conversation.
Now the site is reachable, but probably does not have the appropriate content. I wonder if it is related to this: https://twitter.com/CMUSpeechGroup/status/1511806299490631681
Hello comodoro,
Yes, the Kaldi backend uses this service for generating pronunciation strings of unknown words. The library was changed in version 0.34.0 to generate these strings locally by default. This problem should be solvable by upgrading to the new version:
pip install --upgrade dragonfly2
You may have to install the g2p_en package if you are using an older speech model.
No problem.
Yes, there are pros and cons to both generators. It is possible to re-enable the online generator by setting the allow_online_pronunciations
Kaldi engine option to True
. See the engine documentation for how to do that. It looks like the service is still down for the moment, however.
I suppose the CMU Sphinx tools used by the online service are more refined than the g2pE library. They have certainly been around a little longer.
copying six.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
six: module references __path__
creating dist
creating 'dist\six-1.16.0-py2.7.egg' and adding 'build\bdist.win32\egg' to it
Traceback (most recent call last):
File "setup.py", line 57, in <module>
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*",
File "C:\Python27\lib\site-packages\setuptools\__init__.py", line 143, in setup
return distutils.core.setup(**attrs)
File "C:\Python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 67, in run
self.do_egg_install()
File "C:\Python27\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\site-packages\setuptools\command\bdist_egg.py", line 234, in run
dry_run=self.dry_run, mode=self.gen_header())
File "C:\Python27\lib\site-packages\setuptools\command\bdist_egg.py", line 497, in make_zipfile
visit(z, dirname, files)
File "C:\Python27\lib\site-packages\setuptools\command\bdist_egg.py", line 490, in visit
z.write(path, p)
File "C:\Python27\lib\zipfile.py", line 1158, in write
zinfo = ZipInfo(arcname, date_time)
File "C:\Python27\lib\zipfile.py", line 328, in __init__
raise ValueError('ZIP does not support timestamps before 1980')
ValueError: ZIP does not support timestamps before 1980
That's fair. I cannot deny that Python 3 is easier to work with now. You have everything up and running now then?
I will say that pywin32 in particular is best installed via their installer, available from the releases page. As I understand it, certain important post-install tasks for that package cannot be run via pip.