Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dictation not working on recent commits #922

Closed
colings86 opened this issue Jul 17, 2022 · 5 comments
Closed

dictation not working on recent commits #922

colings86 opened this issue Jul 17, 2022 · 5 comments

Comments

@colings86
Copy link

Commits after b26bf15ee1fb0b5feb6846d6e8077d8ee6cc9028 on the main branch cause all dictation (say command, formatters and dictation mode) to not work for me using Talon 0.3.0 on a Mac M1. The talon.log file shows the following error when talon starts up. Checking out commit b26bf15ee1fb0b5feb6846d6e8077d8ee6cc9028 directly makes dictation work and does not show the error on startup but the (currently) three commits after that on main do not work for me.

Note that another user has also reported seeing this on the Talon Slack chat (https://talonvoice.slack.com/archives/C7ENXA7C4/p1658075312159609?thread_ts=1658061197.879179&cid=C7ENXA7C4).

2022-07-17 16:58:13 ERROR user.knausj_talon.code.vocabulary: action dictate.replace_words() failed type check
   20:  lib/python3.9/threading.py:937* # loader thread
   19:  lib/python3.9/threading.py:980* 
   18:  lib/python3.9/threading.py:917* 
   17:     app/resources/loader.py:827| 
   16:     app/resources/loader.py:771| 
   15: talon/scripting/registry.py:193| 
   14: talon/scripting/registry.py:204| 
   13: talon/scripting/dispatch.py:105| 
   12: talon/scripting/dispatch.py:144| 
   11: talon/scripting/dispatch.py:135| 
   10:     talon/scripting/rctx.py:233| # 'update_decls' main:update_decls()
    9:    talon/scripting/scope.py:150| 
    8:    talon/scripting/scope.py:131| 
    7: talon/scripting/dispatch.py:105| 
    6: talon/scripting/dispatch.py:144| 
    5: talon/scripting/dispatch.py:135| 
    4:     talon/scripting/rctx.py:233| # 'change' main:_registry_update_contexts()
    3:    talon/scripting/scope.py:55 | 
    2: talon/scripting/registry.py:455| # [stack splice]
    1:    talon/scripting/types.py:196| 
talon.scripting.types.ActionImplError: Function 'dictate.replace_words' incompatible with prototype 'dictate.replace_words'
  Signature: (words: collections.abc.Sequence[str]) -> collections.abc.Sequence[str]
  Expected:  (words: Sequence[str]) -> Sequence[str]
  - Parameter 'words' type annotation does not match prototype. Found 'collections.abc.Sequence[str]', expected 'Sequence[str]' (or no annotation)
  - Return type mismatch. Found 'collections.abc.Sequence[str]', expected 'Sequence[str]' (or no annotation)
2022-07-17 16:58:15  INFO (SpeechSystem) Activating speech engine: W2lEngine(fast Conformer b108 (2021-09-15))
2022-07-17 16:58:15 DEBUG Dispatched launch events at 1.4764s, done at 2.7376s
2022-07-17 16:58:15 ERROR [!] 2 error(s) during startup (shown earlier in log)
@colings86
Copy link
Author

It seems that this commit (2bafd31d) might be the cause since it seems to add the collections.abc.Sequence that the talon error above mentions

@colings86
Copy link
Author

Reverting the commit mentioned above locally also solved the issue. Not that I'm suggesting that should be the fix here, only that this indicates that particular commit seems to be the cause.

@lunixbochs
Copy link
Collaborator

lunixbochs commented Jul 17, 2022

See also:

#816
#918 (comment)

Please remove pyupgrade from the knausj_talon process and revert any typing changes for now until I have official advice on this.

In general, pyupgrade seems like it's a bad idea to run automatically on talon repos. Any syntax upgrades should be intentional and measured.

phillco added a commit that referenced this issue Jul 17, 2022
We don't want pyupgrade: #922

We will add back individual formatters later.
phillco added a commit that referenced this issue Jul 17, 2022
We don't want pyupgrade: #922

We will add back individual formatters later.
@rntz
Copy link
Collaborator

rntz commented Jul 17, 2022

This should be fixed now. If you could confirm it works for you that would be great.

@colings86
Copy link
Author

Thanks for the super quick fix. I can confirm that the latest main commit works for me.

georgejdli pushed a commit to georgejdli/georgejdli_talon that referenced this issue Jul 22, 2022
We don't want pyupgrade: talonhub#922

We will add back individual formatters later.
code-n-cool added a commit to code-n-cool/social-community that referenced this issue May 10, 2024
We don't want pyupgrade: talonhub/community#922

We will add back individual formatters later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants