-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
Voice commands #173
Voice commands #173
Conversation
…nto voicerecognition
Use speech recognition prefix for better accuracy Add (toggleable) audio feedback Support FunctionKeys enumeration most significative values Allows voice commands user customization per language Display voice prefix on splash screen
Use latests NUnit
Add unit test for ConfigurablCommandService
@@ -124,7 +124,7 @@ private void Load() | |||
|
|||
public void ApplyChanges() | |||
{ | |||
bool reloadDictionary = Settings.Default.ResourceLanguage != ResourceLanguage; | |||
bool reloadDictionary = Settings.Default.KeyboardLanguage != KeyboardLanguage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not related to this PR, but I had to fix this to make unit tests working.
I had a few small pieces of feedback: There is an empty Commands folder in the project. When the user puts OptiKey to "sleep", either via the key or a voice command, then voice commands should also sleep if they are active. Similarly if voice commands are enabled it would be very useful to be able start and stop voice recognition with commands; "Opti Listen"/"Opti Stop Listening" for example. The use case is if you wanted to talk to someone in the room while still using OptiKey and didn't want the voice commands incorrectly responding to your voice. I don't think there should be a voice command to clear the scratchpad by default. The commands should exist, but accidentally triggering it would be annoying as it would undo any typing you'd already entered, so maybe just leave the commands blank, for the user to enter if they want to use it? I managed to trigger commands without using the prefix. I also triggered actions by saying unrelated words. Have you seen either behaviour? Is the recognition too eager as the set of possible phrases is so small? |
Toggle voice recognition global state with voice commands
I've deleted the Voice recognition is disabled while Optiky is sleeping and now the overall recognition system can be toggled with voice command (equivalent of going to the management console and clicking on the relevant checkbox). For that, I added two new FeatureKeys, in case we want a button for that in the future. Regarding the scratchpad, I've wired the Normally it can't be possible to trigger something without prefix, I'm still investigating this point. |
Hi Damien, That all sounds great. I'm taking a small break for a couple of weeks and On Wed, 18 Nov 2015 08:05 Damien Simonin Feugas notifications@github.com
|
Hi Julius. I've backport master to allow pull-request automatic resolution. |
…nto feugy-voicerecognition
Fields to readonly Remove unused fields All user settings should be roaming Minor refactoring Introduction of constant string Reduce nesting
Hi, I've had a quick look over the code and tested the functionality. I have started making a few (minor) changes which I've published here: https://github.com/OptiKey/OptiKey/tree/feugy-voicerecognition - if you could make your next pull request against that then we can work iteratively to resolve any outstanding issues. Firstly I should answer your questions:
Secondly, I have some more feedback for you. It's all looking really promising, but I think we have a few gremlins to take care of before this can be released:
|
Ignore the close - it was a mis-click. |
The changes you made are precisely what I needed for unrecognized patterns (I didn't knew about the
(PS and thank you for having spell checked my code !) |
I'll check that the prefix is set and re-test tonight. No problem on spell check - your words weren't mis-spelled per-se, they were just the US English version so I changed them to UK English! :) I'm not sure Microsoft.Speech would be better as it needs to be trained, i.e. you need to record each phrase. Maybe there is a way in System.Speech of defining how accurate the match must be before it is considered a match? "toggle the VoiceCommandsEnabled if an exception is caught during initialization" - I think an error event should also be thrown. |
Use fixed point for VoiceCommandTrigger.
Hi @feugy - let me know when this pull request is ready for another review. |
…fidences separately
Improved ToastNotification management, that displays notification one by one, even during startup. Usage of MVVM validation to avoid Voice recognition prefix
Hi Julius. I think it's better now: all your remarks where taken into account, and it will be great if you have time to check them. I've added notable stuff:
Regarding command help, I'd like to propose you something, but on a separated branch. |
Hi Damien, Great - I'll check it soon. Regarding the new branch - would you like me to reject the existing PR and Regards, On Sun, 27 Dec 2015, 16:47 Damien Simonin Feugas notifications@github.com
|
I was thinking about dissociating the help feature from the voice recognition, so no deletion at all, just two different pull request. |
Ok sounds good. Is the current PR still ok to be auto merged? On Sun, 27 Dec 2015, 21:55 Damien Simonin Feugas notifications@github.com
|
For me yes. |
Should I wait for the second pull request before I test both together? On Tue, 29 Dec 2015, 09:03 Damien Simonin Feugas notifications@github.com
|
IMO, they need to be handled differently. I've opened #199 to discuss the help system, I think this one will also take some time before landing. |
Ok. I'll take a look at PR #173 in isolation as soon as I can. Probably in On Tue, 29 Dec 2015, 09:41 Damien Simonin Feugas notifications@github.com
|
WOW, voice commands - is it possible to do that in other languages, too? (Slovene/Slovenian) |
Hi @d-mojca. But @JuliusSweetland didn't had time to review this PR, and I personally can't dedicate any more time for another huge merge, so it's likely that this feature won't land into master. |
At last, a working implementation for voice commands.
User can now activate some commands (mouse clicks, scroll, magnifier, calibration, quit, browsing between keyboards...) with spoken sentences.
It uses Microsoft's built-in speech recognition engine, and is an alternative to mouse/gaze to trigger FunctionKeys.
After some tests, it became obvious that a prefixed grammar was needed. Users must start their order by a keyword (like with or Google Now).
When a command is recognized and applied, I used the speech synthesis to provide a feedback. It helps understand edge cases when user command is misunderstood.
All can be tuned from the Management console with a dedicated panel:
Opti
by default)Default commands are provided. A new Voice.resx file (that can be localized) was included, and is copied to application folder (
AppData\Roaming\JuliusSweetland\OptiKey\Commands
), allowing user to customize. Any time you will make a new version with new defaults, they will be merged with user's custom commands for the matching language.Still 3 things from my point of view:
I suggest to use NUnit 3.0.0 (currently RC2) which includes more expressive assertions.
Last of all, I wonder if it could be possible/relevant to use voice commands during calibration.
It could make users more autonomous during this delicate process.