aenea icon indicating copy to clipboard operation
aenea copied to clipboard

What to do after _hello_world_aenea.py?

Open kevinsimper opened this issue 8 years ago • 2 comments

Really awesome project! I got the whole setup running, and I am able to run the _hello_world_aenea command and see it show up on my OSX system, but I am then confused about what to do next?

I can't seem to dictate anything and I don't really know how to write my own grammers with dragonfly.

I have also copied in _aenea.py.

What are the easiest way to get started? :)

kevinsimper avatar Apr 28 '16 19:04 kevinsimper

At one point I had hopes of having a unified suggested "starting point" of grammars and config that would work well enough out of the box, but in corresponding with various users I concluded that the only thing we could really agree on tpope/vim-sensible style would be the null set.

I personally used the grammars in https://github.com/dictation-toolbox/aenea-grammars. You might also be interested in https://github.com/dictation-toolbox/dragonfly-scripts, which are not mine. As with all things in this project, more than some assembly is required.

It would be nice to have a default setup with things working together for people to base off of. I'll leave this open as a tracker for that, though I'm unlikely to work on it in the foreseeable future.

calmofthestorm avatar May 07 '16 20:05 calmofthestorm

@kevinsimper I had the same experience when I first got aenea up and running, and I've only recently come back to it.

In my experience you'll need to be prepared to hack on & add to the existing grammars (and if you're on OS X, sometimes aenea itself) to do what you need, and at the very least you'll need to read through the grammars to see what the voice commands are.

To activate a grammar, you put it in MacroSystem folder and run dragon like you did with _hello_world_aenea; for example, I'm a vim user so I dropped in _vim.py.

But another thing to pay attention to is the grammar's context. For me, the context defined by the vim grammar didn't work where I use vim (mostly iTerm/tmux and Xvim). If the context doesn't match, then the dictation won't come through even if the grammar is enabled. For simplicity I found you can just set the context in the grammar to AlwaysContext().

If you happen to be an OS X and vim user, it looked like the server was essentially sending a cmd+v to paste in the dictation, but I found that didn't work when inputting vim commands, and I can imagine other situations where it might cause problems. Instead I found a library to simulate input events and began using it here. My experimentation with it isn't far enough along to make a serious issue/PR, but it looks promising and lets me get on with writing a vim grammar. Anyway, that's the kind of stuff you can expect to encounter where you need to make different assumptions based on your particular setup.

sweetmandm avatar May 08 '16 02:05 sweetmandm