Using This Repository
Chances are you do not work in exactly the same way as I do. I use Vim (find my .vimrc here) as my primary editor, and generally program in either Go or Python. The commands and grammars that are shared in this repository reflect that and are designed to work in my workflow.
That said, the grammars found here should be a good starting point either as examples or templates to help you write your own. It takes a while, but if they are built up over time I have found they can be very powerful.
Want to help make getting started with voice coding easier? Send me a pull request!
I would love to add more languages and more features. There are plenty of commands that are missing, and even more that not work as well as they could. Any help is welcome.
And of course if you have a friend who struggles with RSI or carpal tunnel syndrome please tell them there is a better way.
Here are some tasks or know issues that need to be worked on:
- Improve editing. Currently creating new code is significantly easier than refactoring old code. This means better support for selecting, copying, and editing words and lines.
Some of the grammars in this repository use a configuration file to increase
their flexibility. Rename the
grammar_config.json.sample file to
grammar_config.json and use the guide below to make the required configuration
Window Manager Options
Choose from "cinnamon" or "i3" to specify what type of window manager to use.
If using the i3 window manager, use this option to specify the mod key. Options are "alt", "win", and "ctrl".
If set, this word will be put in a grammar as-is, allowing Aenea to correctly spell or write your company name.
If set, adds a command "my full name", which outputs the value specified.
If set, as a command "my first name", which outputs the value specified.
If set, adds a command "my last name", which outputs the value specified.
If set, adds a command "my email", which outputs the value specified.
These instructions will take you from a fresh installation of Windows and Ubuntu to a working voice controlled setup. If you are just looking for the grammars you can skip this section.
These steps are meant to be performed on a Windows machine with an attached microphone. I suggest using a virtual machine as it will allow you to save snapshots as you progress through the steps.
The machine should have about 2GB of ram and two processors.
- Install Dragon NaturallySpeaking 13.0 to default location
- Take a snapshot of the VM
- Download and install Python 2.7.8 for x32
- Run get-pip.py to install pip
- Install the latest release of pywin32 for Python 2.7
- Install the latest release of NatLink
- Install other dependencies (
python -m pip install dragonfly jsonrpclib pyparsing)
- Take another snapshot of the VM
- Start a cmd window as administrator
- Navigate to
start_natlinkconfigfunctions.pythen use the
eoption to enable
- If problems are encountered, take a look at this Github issue for help
C:\NatLink\NatLink\MacroSystemand edit the ip to the ip of the host
- Copy the dictation client from the client directory to the NatLink directory
- Disable the dictation window in Dragon so you can use the dictation client
These instructions were written for an machine running ubuntu 14.04 LTS.
- Go to the server (linux machine) and navigate in the aenea dir to
config.pyand edit, setting the ip to 0.0.0.0
- Install pip on the host machine (
sudo apt-get install python-pip)
- Install xsel and xdotool (
sudo apt-get install xsel xdotool)
- Use pip to install jsonrpclib, and yapsy (
sudo pip install jsonrpclib yapsy)
- On the server, start
- On the client, start Dragon Naturally Speaking
- On the client, start
- Give the dictation window focus so it captures anything not covered by a grammar
I previously used the Yeti by Blue and while it worked well in quiet environments, it slowed down greatly as the noise level increased. I am now using (and highly recommend) the Sennheiser MD431-II with the Focusrite Scarlett Solo. It is certainly a price jump, but its performance is outstanding, even when others are talking very near me. Keep the gain low, and speak directly into the microphone.