Getting Started

Welcome to the Serenade guide! Let’s get started.

Installation

First, download the Serenade app here. Serenade works across Windows, Mac, and Linux.

After installing the app, you’ll also want to install the Serenade plugin for Atom or VS Code (or both!) from that same link. Without a plugin installed, you won’t be able to use all of Serenade’s features.

Open the Serenade app. After you log in, you should see something like this:

https://cdn.serenade.ai/img/app.png

Mac Setup

If you’re using a Mac, Serenade will ask for permission to use your microphone and to control your computer using accessibility features. For instance, you might see a dialog that looks like this:

https://cdn.serenade.ai/img/mac-access-dialog.png

To make sure Serenade has the right permissions, open System Preferences > Security & Privacy > Privacy. Then, ensure Serenade has Microphone access:

https://cdn.serenade.ai/img/mac-microphone.png

And, make sure Serenade has Accessibility access:

https://cdn.serenade.ai/img/mac-accessibility.png

Community

To get help with Serenade, check out the community. Don’t hesitate to post questions, feedback, and bug reports—we’ll get back to you quickly.

Hello, Serenade

Now that you’re set up, let’s write a few lines of code with voice! First, open up Serenade, along with Atom or VS Code (make sure you’ve installed the plugins!). As you speak to Serenade, you’ll see a list of transcripts appear in the app, so it’s best to leave Serenade open side-by-side with your editor.

Sometimes, Serenade isn’t sure exactly what you said, so it will show you several different transcripts. If the first row is what you intended to say, then you can select it by saying:

use one

Here, one is the number of the row you’d like to select, so saying use two would select the second row, and so on. Clicking the row will also work.

If none of the alternatives are right, and you’d like to start over, just say:

clear

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.

Now, let’s start writing some code. Create a new file in your editor called hello.py. Next, press the Listen button on the Serenade app. Then, focus Atom or VS Code by clicking on the editor—Serenade will send commands to whichever window currently has focus (i.e., the window in the foreground).

Now, try saying:

add import random

You should see a list of alternatives appear in the Serenade app. Remember, you can say clear to clear the list and start over, or use followed by the number you want to select. For instance, if the correct code appears as the first item in the list, you can say:

use one

You should now see the below code in your editor:

import random

If you accidentally select the wrong alternative, you can always say:

undo

to go back. As you’d expect, redo also works.

Next, create a new function by saying:

add function get random

Then, select an alternative with a use command, and you should see:

import random

def get_random():
    pass

You’ll notice that Serenade took care of a few syntax details for you, so you didn’t have to dictate “def”, the parens, and so on. Next, add a parameter to your new function with:

add parameter number

After saying a use command, you should see:

import random

def get_random(number):
    pass

With that command, you didn’t need to move your cursor at all—Serenade knew where the parameter should be added in the file.

Let’s give our function a body by saying:

add return four

After saying a use command, you should see:

import random

def get_random(number):
    return 4

Notice that you didn’t have to remove the pass statement yourself, as Serenade automatically did that for you.

You can move your cursor around with commands like:

up
next line
line one

Try moving your cursor to the first line. After you’ve done so, remove the first line you added by saying:

delete line

Now, you should have the below code:

def get_random(number):
    return 4

Let’s try doing a refactor with voice. Suppose you want to move the body of this function to its own separate function. You can say:

move body to function underscore value

After saying a use command, you should see:

def _value():
    return 4

def get_random(number):
    return _value()

Here, Serenade created a new function, moved the code you specified to the body of that function, and replaced the original code with a call to that new function.

You can reference blocks of code with selectors. For instance, you can say commands like:

next function
previous return value
copy parameter

As you’d expect, paste works.

You can find or change text using the phrase selector. Try saying:

go to phrase random

Your cursor should move to the start of the word random. Then, try saying:

change phrase random to value

That should leave you with the below:

def _value():
    return 4

def get_value(number):
    return _value()

That’s it for our introduction! Head to the next section to continue learning more Serenade commands: Basic Usage.