From 44f3468e4d847cbab445efc33560e242fc124dc7 Mon Sep 17 00:00:00 2001 From: Kendon Bell Date: Fri, 20 Mar 2026 16:17:21 +1300 Subject: [PATCH 1/6] Bump KaldiAG support to 3.2.x --- CHANGELOG.rst | 2 ++ documentation/kaldi_engine.txt | 5 ++++- dragonfly/engines/backend_kaldi/engine.py | 2 +- setup.py | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4741dc7b..4c109b98 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -28,6 +28,8 @@ Changed compiling them directly. - Change the CommandModule class' optional unload method to invoke top-level unload functions like the Natlink loader does. +- Bump the supported ``kaldi-active-grammar`` line to 3.2.x so the + ``dragonfly[kaldi]`` extra installs the updated dependency set. - Make the logging output of Dragonfly's CLI commands more sane. - Make some optimizations to the Natlink engine. - Rename the engines.backend_sphinx.misc module to config. diff --git a/documentation/kaldi_engine.txt b/documentation/kaldi_engine.txt index 83d8dbc2..c4990038 100644 --- a/documentation/kaldi_engine.txt +++ b/documentation/kaldi_engine.txt @@ -88,6 +88,9 @@ using:: pip install 'dragonfly[kaldi]' +This remains the canonical install path and now installs the supported +``kaldi-active-grammar`` 3.2.x line. + If you are installing to *develop* Dragonfly, use the following instead (from your Dragonfly git repository):: @@ -149,7 +152,7 @@ Updating To A New Version When updating to a new version of Dragonfly, you should always rerun ``pip install 'dragonfly[kaldi]'`` (or ``pip install '.[kaldi]'``, etc.) to -make sure you get the required version of kaldi_active_grammar. +make sure you get the required ``kaldi_active_grammar`` 3.2.x version. Engine Configuration diff --git a/dragonfly/engines/backend_kaldi/engine.py b/dragonfly/engines/backend_kaldi/engine.py index 50a0b4b1..a70ee687 100644 --- a/dragonfly/engines/backend_kaldi/engine.py +++ b/dragonfly/engines/backend_kaldi/engine.py @@ -66,7 +66,7 @@ class KaldiEngine(EngineBase, DelegateTimerManagerInterface): _name = "kaldi" # NOTE: Remember to also update setup.py to the same version! - _required_kag_version = "3.1.0" + _required_kag_version = "3.2.0" #----------------------------------------------------------------------- diff --git a/setup.py b/setup.py index 62110649..0a82f4dd 100644 --- a/setup.py +++ b/setup.py @@ -160,7 +160,7 @@ def _try_local_natlink_pyd(self): ], "kaldi": [ # NOTE: Remember to also update engine.py to the same version! - "kaldi-active-grammar ~= 3.1.0", + "kaldi-active-grammar ~= 3.2.0", "sounddevice == 0.3.*", "webrtcvad-wheels == 2.0.*", ], From bd56eeb75c6eb9193ac7f30953f4b94a5157a6b4 Mon Sep 17 00:00:00 2001 From: Kendon Bell Date: Fri, 20 Mar 2026 16:21:11 +1300 Subject: [PATCH 2/6] Trim Kaldi install docs wording --- documentation/kaldi_engine.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/documentation/kaldi_engine.txt b/documentation/kaldi_engine.txt index c4990038..83d8dbc2 100644 --- a/documentation/kaldi_engine.txt +++ b/documentation/kaldi_engine.txt @@ -88,9 +88,6 @@ using:: pip install 'dragonfly[kaldi]' -This remains the canonical install path and now installs the supported -``kaldi-active-grammar`` 3.2.x line. - If you are installing to *develop* Dragonfly, use the following instead (from your Dragonfly git repository):: @@ -152,7 +149,7 @@ Updating To A New Version When updating to a new version of Dragonfly, you should always rerun ``pip install 'dragonfly[kaldi]'`` (or ``pip install '.[kaldi]'``, etc.) to -make sure you get the required ``kaldi_active_grammar`` 3.2.x version. +make sure you get the required version of kaldi_active_grammar. Engine Configuration From e72e4a263d96c62f968d0da118a8dd5511f58931 Mon Sep 17 00:00:00 2001 From: Kendon Bell Date: Mon, 23 Mar 2026 13:25:02 +1300 Subject: [PATCH 3/6] Switch to lark on modern Python versions --- CHANGELOG.rst | 2 ++ documentation/requirements.txt | 2 +- setup.py | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4c109b98..db2271d9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -30,6 +30,8 @@ Changed unload functions like the Natlink loader does. - Bump the supported ``kaldi-active-grammar`` line to 3.2.x so the ``dragonfly[kaldi]`` extra installs the updated dependency set. +- Use ``lark`` on Python 3.8+ and keep ``lark-parser`` for older Python + versions. - Make the logging output of Dragonfly's CLI commands more sane. - Make some optimizations to the Natlink engine. - Rename the engines.backend_sphinx.misc module to config. diff --git a/documentation/requirements.txt b/documentation/requirements.txt index 10ec74dc..9ced131c 100644 --- a/documentation/requirements.txt +++ b/documentation/requirements.txt @@ -4,4 +4,4 @@ six enum34;python_version<'3.4' sphinx-argparse sphinx_rtd_theme -lark-parser +lark diff --git a/setup.py b/setup.py index 0a82f4dd..6271da4e 100644 --- a/setup.py +++ b/setup.py @@ -128,7 +128,10 @@ def _try_local_natlink_pyd(self): "setuptools >= 40.0.0", "packaging >= 19.0", "six", - "lark-parser >= 0.8.0", + # Use the renamed package on modern Python versions, + # while keeping compatibility with older versions. + "lark>=1.0.0;python_version>='3.8'", + "lark-parser>=0.8.0;python_version<'3.8'", # Windows-only dependencies. "pywin32;platform_system=='Windows'", From 499c5f8dd560d049788500ccc76d657b9bb1ae21 Mon Sep 17 00:00:00 2001 From: Kendon Bell Date: Mon, 23 Mar 2026 13:59:37 +1300 Subject: [PATCH 4/6] Update required Kaggle version to 3.1.0 --- dragonfly/engines/backend_kaldi/engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dragonfly/engines/backend_kaldi/engine.py b/dragonfly/engines/backend_kaldi/engine.py index a70ee687..50a0b4b1 100644 --- a/dragonfly/engines/backend_kaldi/engine.py +++ b/dragonfly/engines/backend_kaldi/engine.py @@ -66,7 +66,7 @@ class KaldiEngine(EngineBase, DelegateTimerManagerInterface): _name = "kaldi" # NOTE: Remember to also update setup.py to the same version! - _required_kag_version = "3.2.0" + _required_kag_version = "3.1.0" #----------------------------------------------------------------------- From 55a3dc6e60320af7da70140fc1593c3c490e7c2a Mon Sep 17 00:00:00 2001 From: Kendon Bell Date: Mon, 23 Mar 2026 14:00:03 +1300 Subject: [PATCH 5/6] Update CHANGELOG with dependency version bump Bump kaldi-active-grammar dependency version to 3.2.x. --- CHANGELOG.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index db2271d9..c1a31ce9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -28,8 +28,6 @@ Changed compiling them directly. - Change the CommandModule class' optional unload method to invoke top-level unload functions like the Natlink loader does. -- Bump the supported ``kaldi-active-grammar`` line to 3.2.x so the - ``dragonfly[kaldi]`` extra installs the updated dependency set. - Use ``lark`` on Python 3.8+ and keep ``lark-parser`` for older Python versions. - Make the logging output of Dragonfly's CLI commands more sane. From 0f8efe0358fd77c62f459f148bd3c976e0834fa6 Mon Sep 17 00:00:00 2001 From: Kendon Bell Date: Mon, 23 Mar 2026 14:00:28 +1300 Subject: [PATCH 6/6] Downgrade kaldi-active-grammar to version 3.1.0 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 6271da4e..ad4e8d80 100644 --- a/setup.py +++ b/setup.py @@ -163,7 +163,7 @@ def _try_local_natlink_pyd(self): ], "kaldi": [ # NOTE: Remember to also update engine.py to the same version! - "kaldi-active-grammar ~= 3.2.0", + "kaldi-active-grammar ~= 3.1.0", "sounddevice == 0.3.*", "webrtcvad-wheels == 2.0.*", ],