{"id":32177250,"url":"https://github.com/dictation-toolbox/dragonfly","last_synced_at":"2026-02-21T18:03:24.839Z","repository":{"id":28478487,"uuid":"92488919","full_name":"dictation-toolbox/dragonfly","owner":"dictation-toolbox","description":"Speech recognition framework allowing powerful Python-based scripting and extension of Dragon NaturallySpeaking (DNS), Windows Speech Recognition (WSR), Kaldi and CMU Pocket Sphinx","archived":false,"fork":false,"pushed_at":"2026-01-22T01:03:47.000Z","size":5849,"stargazers_count":412,"open_issues_count":26,"forks_count":77,"subscribers_count":20,"default_branch":"master","last_synced_at":"2026-01-22T14:52:19.849Z","etag":null,"topics":["python","speech-recognition"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dictation-toolbox.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-05-26T08:23:01.000Z","updated_at":"2026-01-22T01:03:52.000Z","dependencies_parsed_at":"2024-03-01T06:29:34.230Z","dependency_job_id":"c85cebf6-711a-44cc-acb2-0f51fd7b29f3","html_url":"https://github.com/dictation-toolbox/dragonfly","commit_stats":{"total_commits":1622,"total_committers":34,"mean_commits":"47.705882352941174","dds":0.592478421701603,"last_synced_commit":"6898c8d003d201d698cbfd82f01a46471d315844"},"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"purl":"pkg:github/dictation-toolbox/dragonfly","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dictation-toolbox%2Fdragonfly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dictation-toolbox%2Fdragonfly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dictation-toolbox%2Fdragonfly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dictation-toolbox%2Fdragonfly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dictation-toolbox","download_url":"https://codeload.github.com/dictation-toolbox/dragonfly/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dictation-toolbox%2Fdragonfly/sbom","scorecard":{"id":341090,"data":{"date":"2025-08-11","repo":{"name":"github.com/dictation-toolbox/dragonfly","commit":"f6413f4dde3375f7a2e9fe61d7c9d60f621c5b64"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.9,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/25 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":5,"reason":"5 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/python-publish.yml:7","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/dictation-toolbox/dragonfly/python-publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python-publish.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/dictation-toolbox/dragonfly/python-publish.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:19","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:20","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T05:54:36.708Z","repository_id":28478487,"created_at":"2025-08-18T05:54:36.709Z","updated_at":"2025-08-18T05:54:36.709Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29689644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","speech-recognition"],"created_at":"2025-10-21T20:01:59.349Z","updated_at":"2026-02-21T18:03:24.834Z","avatar_url":"https://github.com/dictation-toolbox.png","language":"Python","readme":"Dragonfly\n=========\n\n|Docs Status|\n|Join Matrix/Gitter chat|\n\n.. contents:: Contents\n\nIntroduction\n----------------------------------------------------------------------------\n\n\nDragonfly is a speech recognition framework for Python that makes it\nconvenient to create custom commands to use with speech recognition\nsoftware. It was written to make it very easy for Python macros, scripts,\nand applications to interface with speech recognition engines. Its design\nallows speech commands and grammar objects to be treated as first-class\nPython objects.\n\nThis project is a fork of the original\n`t4ngo/dragonfly \u003chttps://github.com/t4ngo/dragonfly\u003e`__ project.  It is\nknown as *dragonfly2* on the PyPI repository, but for purposes of\nfunctionality, it is referred to as Dragonfly below.\n\nDragonfly can be used for general programming by voice. It is flexible\nenough to allow programming in any language, not just Python. It can also be\nused for speech-enabling applications, automating computer activities\nand dictating prose.\n\nDragonfly contains its own powerful framework for defining and executing\nactions. It includes actions for text input and key-stroke simulation. This\nframework is cross-platform, working on Windows, macOS and Linux (X11 only).\nSee the `actions sub-package documentation\n\u003chttps://dragonfly.readthedocs.io/en/latest/actions.html\u003e`__\nfor more information, including code examples.\n\nDragonfly currently supports the following speech recognition engines:\n\n-  *Dragon*, a product of *Nuance*. All versions up to 16 (the latest)\n   should be supported. *Home*, *Professional Individual* and previous\n   similar editions of *Dragon* are supported.  Other editions may work too.\n-  *Windows Speech Recognition* (WSR), included with Microsoft Windows\n   Vista, Windows 7+, and freely available for Windows XP.\n-  *Kaldi*, open source (AGPL) and multi-platform.\n-  *CMU Pocket Sphinx*, open source and multi-platform.\n\nDocumentation and FAQ\n----------------------------------------------------------------------------\n\nDragonfly's documentation is available online at `Read the\nDocs \u003chttp://dragonfly.readthedocs.org/en/latest/\u003e`__. The changes in\neach release are listed in the project's `changelog\n\u003chttps://github.com/dictation-toolbox/dragonfly/blob/master/CHANGELOG.rst\u003e`__.\nDragonfly's FAQ is available in the documentation `here\n\u003chttps://dragonfly.readthedocs.io/en/latest/faq.html\u003e`__.\nThere are also a number of Dragonfly-related questions on `Stackoverflow\n\u003chttp://stackoverflow.com/questions/tagged/python-dragonfly\u003e`__, although\nmany of them are related to issues resolved in the latest version of\nDragonfly. Real-time chat and historical discussions about Dragonfly can be\nfound in the `Gitter chat room\n\u003chttps://app.gitter.im/#/room/#dragonfly2:matrix.org\u003e`__ (also `bridged to\nMatrix \u003chttps://matrix.to/#/#dragonfly2:matrix.org\u003e`__).\n\n\nCompoundRule Usage example\n----------------------------------------------------------------------------\n\nA very simple example of Dragonfly usage is to create a static voice\ncommand with a callback that will be called when the command is spoken.\nThis is done as follows:\n\n..  code-block:: python\n\n    from dragonfly import Grammar, CompoundRule\n\n    # Voice command rule combining spoken form and recognition processing.\n    class ExampleRule(CompoundRule):\n        spec = \"do something computer\"                  # Spoken form of command.\n        def _process_recognition(self, node, extras):   # Callback when command is spoken.\n            print(\"Voice command spoken.\")\n\n    # Create a grammar which contains and loads the command rule.\n    grammar = Grammar(\"example grammar\")                # Create a grammar to contain the command rule.\n    grammar.add_rule(ExampleRule())                     # Add the command rule to the grammar.\n    grammar.load()                                      # Load the grammar.\n\nTo use this example, save it in a command module in your module loader\ndirectory or Natlink user directory, load it and then say *do something\ncomputer*. If the speech recognition engine recognized the command, then\n``Voice command spoken.`` will be printed in the Natlink messages window.\nIf you're not using Dragon, then it will be printed into the console window.\n\n\nMappingRule usage example\n----------------------------------------------------------------------------\n\nA more common use of Dragonfly is the ``MappingRule`` class, which allows\ndefining multiple voice commands. The following example is a simple grammar\nto be used when Notepad is the foreground window:\n\n..  code-block:: python\n\n    from dragonfly import (Grammar, AppContext, MappingRule, Dictation,\n                           Key, Text)\n\n    # Voice command rule combining spoken forms and action execution.\n    class NotepadRule(MappingRule):\n        # Define the commands and the actions they execute.\n        mapping = {\n            \"save [file]\":            Key(\"c-s\"),\n            \"save [file] as\":         Key(\"a-f, a/20\"),\n            \"save [file] as \u003ctext\u003e\":  Key(\"a-f, a/20\") + Text(\"%(text)s\"),\n            \"find \u003ctext\u003e\":            Key(\"c-f/20\") + Text(\"%(text)s\\n\"),\n        }\n\n        # Define the extras list of Dragonfly elements which are available\n        # to be used in mapping specs and actions.\n        extras = [\n            Dictation(\"text\")\n        ]\n\n\n    # Create the grammar and the context under which it'll be active.\n    context = AppContext(executable=\"notepad\")\n    grammar = Grammar(\"Notepad example\", context=context)\n\n    # Add the command rule to the grammar and load it.\n    grammar.add_rule(NotepadRule())\n    grammar.load()\n\nTo use this example, save it in a command module in your module loader\ndirectory or Natlink user directory, load it, open a Notepad window and then\nsay one of mapping commands. For example, saying *save* or *save file* will\ncause the control and S keys to be pressed.\n\nThe example aboves don't show any of Dragonfly's exciting features, such as\ndynamic speech elements. To learn more about these, please take a look at\n`Dragonfly's online docs \u003chttp://dragonfly.readthedocs.org/en/latest/\u003e`__.\n\n\nInstallation\n----------------------------------------------------------------------------\n\nDragonfly is a Python package. It can be installed as *dragonfly* using\npip:\n\n.. code:: shell\n\n    pip install dragonfly2\n\nIf you wish to install the latest release candidate for version 1.0.0,\nplease run the following command instead:\n\n.. code:: shell\n\n    pip install dragonfly2==1.0.0-rc2\n\nThese versions are more up-to-date and have fewer requirements.  The\ndocumentation for them is available at `Read the Docs (latest)\n\u003chttp://dragonfly2.readthedocs.org/en/latest/\u003e`_.\n\nIf you are installing this on Linux, you will also need to install the\n`wmctrl \u003chttps://www.freedesktop.org/wiki/Software/wmctrl/\u003e`__, `xdotool\n\u003chttps://www.semicomplete.com/projects/xdotool/\u003e`__ and `xsel\n\u003chttp://www.vergenet.net/~conrad/software/xsel/\u003e`__ programs.\n\nPlease note that, on Linux, Dragonfly is only fully functional in an X11\nsession.  Input action classes, application contexts and the ``Window``\nclass will **not** be functional under Wayland. It is recommended that\nWayland users switch to X11, Windows or macOS.\n\nDragonfly can also be installed by cloning this repository or\ndownloading it from `the releases\npage \u003chttps://github.com/dictation-toolbox/dragonfly/releases\u003e`__ and\nrunning the following (or similar) command in the project's root\ndirectory:\n\n.. code:: shell\n\n    pip install -e .\n\nIf pip fails to install *dragonfly* or any of its required or extra\ndependencies, then you may need to upgrade pip with the following command:\n\n.. code:: shell\n\n    pip install --upgrade pip\n\nTo build the dragonfly python package, run these commands in the projects root directory.  \n\n.. code:: shell\n\n    pip install build  \n    Python -m build\n\n\n\nSpeech recognition engine back-ends\n----------------------------------------------------------------------------\n\nInstallation instructions, requirements and API references for each\nDragonfly speech recognition engine are documented separately on the\nfollowing pages:\n\n* `Natlink and DNS engine\n  \u003chttp://dragonfly.readthedocs.org/en/latest/natlink_engine.html\u003e`_\n* `SAPI 5 and WSR engine\n  \u003chttp://dragonfly.readthedocs.org/en/latest/sapi5_engine.html\u003e`_\n* `Kaldi engine\n  \u003chttp://dragonfly.readthedocs.org/en/latest/kaldi_engine.html\u003e`_\n* `CMU Pocket Sphinx engine\n  \u003chttp://dragonfly.readthedocs.org/en/latest/sphinx_engine.html\u003e`_\n* `Text-input engine\n  \u003chttp://dragonfly.readthedocs.org/en/latest/text_engine.html\u003e`_\n\n\nExisting command modules\n----------------------------------------------------------------------------\n\nThe related resources page of Dragonfly's documentation has a section on\n`command\nmodules \u003chttp://dragonfly.readthedocs.org/en/latest/related_resources.html#command-modules\u003e`__\nwhich lists various sources.\n\n.. |Docs Status| image:: https://readthedocs.org/projects/dragonfly/badge/?version=latest\u0026style=flat\n   :target: https://dragonfly.readthedocs.io\n.. |Join Matrix/Gitter chat| image:: https://img.shields.io/matrix/dragonfly2:matrix.org.svg?label=%5BMatrix%20chat%5D\n   :target: https://app.gitter.im/#/room/#dragonfly2:matrix.org\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdictation-toolbox%2Fdragonfly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdictation-toolbox%2Fdragonfly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdictation-toolbox%2Fdragonfly/lists"}