This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from dragonfly.actions.action_startapp import BringApp | |
class BringFileman(BringApp): | |
""" | |
Dragonfly BringApp subclass for file manager applications. | |
Explorer.exe usage examples:: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This command module automatically posts input language change request | |
messages to all top-level windows as a workaround for keyboard layouts where | |
Dragonfly's Win32 key input doesn't work properly. | |
Use this module by loading it as a Dragonfly command module. | |
""" | |
import time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Example using custom English language integers. | |
""" | |
from dragonfly import Key, MappingRule, Grammar | |
from custom_integers_en import MyIntegerRef | |
rule = MappingRule( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Command-line program for using Natlink's inputFromFile() function to process | |
speech from a wave file. | |
It looks like Dragon expects wave files to have a 16 kHz sample rate, a | |
signed 16-bit (LE) format and one recording channel. A NatError will be | |
raised if the file was not accepted. | |
""" | |
import argparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# (c) Copyright 2020 by Dane Finlay | |
# Licensed under the LGPL. | |
""" | |
This is a simple grammar I put together for testing Dragonfly's Windows | |
Speech Recognition (WSR) engine with Chinese. | |
It should work with WSR if you have the Windows display and speech input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Dictation & command mode Dragonfly grammar | |
============================================================================ | |
This module defines a configurable grammar for using three different | |
command/dictation modes. The modes can be configured externally by modifying | |
the number in the grammar's status file. The modes and associated status | |
numbers (0-2) are defined as follows: | |
0. Command-only mode. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dragonfly example script using Dragon's MsgBoxConfirm function via | |
# natlink.execScript(). | |
import natlink | |
from dragonfly import CompoundRule, MappingRule, Grammar, Key | |
class DialogExampleRule(CompoundRule): | |
spec = "open dialog" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This example is related to a Natlink/DNS bug. | |
# Place this file in the Natlink user folder (MacroSystem) to use it. | |
from natlinkutils import GrammarBase | |
class NatGrammar(GrammarBase): | |
# Quotes in rule <1> seem to fix the bug where commands aren't recognised. | |
gramSpec = """ | |
<dgndictation> imported; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Natlink doesn't usually work well with other threads because of how it | |
# works internally. This example command module demonstrates a workaround | |
# for this problem using a Dragonfly timer and Thread.join(). | |
# | |
# This workaround can work using the natlink.setTimerCallback() function | |
# directly instead. | |
# | |
# Copy this file into the natlink MacroSystem folder to try it out. | |
import threading |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This file is a command-module for Dragonfly. | |
# (c) Copyright 2008 by Christo Butcher | |
# Licensed under the LGPL, see <http://www.gnu.org/licenses/> | |
# | |
""" | |
Command-module loader for natlink | |
================================= |
NewerOlder