Welcome to the Serenade guide! Let’s get started.
Register for a Serenade account here. Then, follow the instructions on that page to install Serenade.
Let’s write a few lines of code with voice. When dictating voice commands, speak as you normally would in a conversation. Over-enunciating words or letters can actually make it harder for Serenade to understand you, so just try to talk naturally (even in cases where Serenade didn’t hear you correctly the first time). You can also pause while speaking, and Serenade will wait for you; there’s no need to try to say an entire command in one breath.
As you speak, you’ll see alternatives appear on the side of your screen. To select an alternative to run, say:
one is the number of the row you’d like to select. When Serenade is confident in what you said, your command will be executed automatically, without you needing to say
If none of the alternatives are right and you’d like to start over, just say:
Now, let’s get started. First, create a new Python file called
hello.py. Then, press the
Listen button on the Serenade panel. Try saying:
add import random
Then, select the appropriate alternative by saying
use two, etc. You should see the below code added to the editor:
If you accidentally select the wrong alternative, you can go back by saying:
redo also works.) Next, create a function by saying:
add function get random
use command to select an alternative, and then you should see:
import random def get_random(): pass
You can add a parameter called
number to your function by saying:
add parameter number
After you say a
use command, you should see:
import random def get_random(number): pass
Let’s give the function a body. try saying:
add return four
After saying a
use command, you should have the code:
import random def get_random(number): return 4
You can move around the cursor with commands like:
up down left right next line previous word line one
For instance, try saying:
Now, your cursor should be back on the first line of the file. To delete that line, you can say:
Now, the import statement you added earlier should be removed.
That’s it for our introduction! To learn more things you can do with Serenade, head to the next section, Basic Usage.