aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Programming
  • Software
  • Tech

Coding with Serenade: Hands-Free Voice-Activated Programming

  • root
  • February 9, 2021
  • 5 minute read

The emergence of voice-controlled devices like Siri, Amazon Echo, and Google Home have simplified tasks that previously required a keyboard. But we’ve only just begun to inhabit a world filled with devices that we control in different ways, one where we can accomplish more by what we say than what we can do. Serenade aims to tackle an interesting problem: writing code through speech.

Serenade is a voice-to-code software that’s available to plug into several popular IDEs, like VS Code and IntelliJ. Their claim is to allow you to code “using natural speech,” and with support for nearly a dozen languages, it’s an intriguing proposition. The ability to code through voice commands is more than just a Sci-Fi fantasy. For programmers with carpal tunnel, or other more severe physical ailments, coding can continue to provide them access to the creative endeavor they enjoy—and a living.


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

Is Serenade actually viable? In this post, we’ll put the program to the test. My colleague Garen and I will attempt to build a Node.js site, with a simple HTML and CSS frontend, using only our voice. Our site will be nothing more than a button that, when clicked, will display a random emoji. To truly immerse ourselves in the hands-free experience, we’ll also attempt to deploy the app to Heroku using their CLI. Let’s get started!

 

Set up the server

As with most new projects, we’d like to create a new directory, change into it, and install my package dependencies. Since we can only use Serenade within the IDEs they support, we must resort to macOS’ Dictation feature, which is  lacking and unable to comprehend programmer speak. We must explicitly spell out Unix commands, or the program won’t understand them. Furthermore, there doesn’t seem to be any way to enforce lowercase, which really irks the directory aesthetic. Perhaps most frustrating of all is the inability to speak filename conventions.

Read More  Innovative Microwave Solutions Proposed At Huawei 5G Microwave Asia-Pacific Conference for Heavy-Rain Regions

 

 

In order to move this along, we just typed npm i express --save-devon the command line, created a new file called server.js, and opened up Visual Studio Code. Hands 1, Voice 0.

Serenade runs on your computer and detects your IDE, in order to integrate with its functionality. After installing and activating the app, you can pretty much get started by issuing explicit directives. In the event that Serenade didn’t understand, you can choose a visual option to resolve the ambiguity. There are several tutorials available to help you begin learning the directives.

Here’s our first try:

 

First attempt at using Serenade

There’s a lot to like about how Serenade works: it knows common IDE commands like “delete word”. Additionally, in general, if you speak out a sentence, it’ll know when to add spaces and semicolons. However, one issue to keep in mind is the fact that Serenade has three different ways to add text:

  • insert, which is a general way to describe a line
  • add, which specifically recognizes language features like classes and functions
  • type, which enters raw, plain text

Knowing which one to use can be a bit confusing, but after spending some time with the program (and thoroughly reading the documentation), it is possible to move at a somewhat faster clip. However, phrases are still misunderstood from time to time:

 

Moving a little faster as I learn the syntax

There seems to be some confusion about where to place parentheses and arguments. On occasion, it can feel like we’re fighting against the app’s syntax, rather than it understanding me. Hands 2, Voice 0.

Read More  Billions Of Transistors Make Up A Processor. This Video Shows How They Are Made.

 

Write the HTML and CSS

Let’s assume we did manage to get a basic server going:

const express = require('express');

const app = express();
const path = require('path');

app.get('/', <span class="hljs-function">function(req, res) </span>{
   res.sendFile('/index.html');
});

app.listen(8080);

We’ll now write a file called index.html to represent the entirety of our design. HTML is meant to be a structured language; how does it fare?

 

HTML for the win

Success! Writing HTML is a breeze. We were worried there would be some mistakes with tag placement, especially after adding the attributes, but the alignment and nesting are well understood. Hands 2, Voice 1.

 

CSS also works well

This is an example of when a really close understanding of the underlying language’s grammar is really important; I never knew the bracketed CSS definitions were specifically called “rulesets.”  Still, at this point, we’ve started to understand how Serenade works, including its nifty capability to move directly to a line. Hands 2, Voice 2.

 

Write the client-side JavaScript

Our final HTML and CSS will end up looking like this:

<!DOCTYPE html>

<span class="xml"><html>
    </span><head>
    <link rel=stylesheet type=text/css href=/main.css></link>
    <script src="main.js"></script>
    </head>
    <body>
    <h1>hello!</h1>
    <p id="container"></p>
    <button id="emoji">Emoji!</button>
    </body><span class="xml">
</html></span>
h1 {
  <span class="hljs-attr">color</span>: blue;
  margin-top: 1em;
}
#container {
  text-align: center;
}

To avoid executing our JavaScript immediately, we need to wait for the DOMContentLoaded event to fire before setting up any event listeners. Capitalization matters here, and we couldn’t get Serenade to recognize the right spelling:

Capitalizations are a challenge

Still, either through our increased proficiency with Serenade, or the relatively straightforward nature of what to add, it was easy to add the event handling code. As programmers are not infallible, we intentionally tried to make mistakes to see if Serenade could recover. For example, we missed some indentation:

 

Read More  Snooze Your Alert Policies In Cloud Monitoring

 

We’ll call this one a draw.

 

Deploy to Heroku

For the final piece of our test, we need to deploy to Heroku. Heroku requires a Procfile, which is rather short for this project.

web: node index.js

Unfortunately, once again, the obstacle here is switching to the Dictation app, which simply cannot understand the commands required to push this application up to Heroku:

With a final clinch at the end: Hands 3, Voice 2.

 

Conclusion

Serenade is pretty fun to use. Navigating the IDE is solid, and explicitly speaking out the proper names for programming concepts makes one feel like a wise sage. However, it requires a specific understanding of the various commands, which doesn’t feel like speaking English; it feels like I’m speaking specific instructions to a computer, rather than a person I’m pair programming with.

Still, I’d recommend it as a system to augment your current two-handed coding style, rather than a full-on replacement. With practice and patience, it could be a useful tool for developers who otherwise can’t code. And as a nice touch, the company provides free one-on-one training to anyone who wants to get started quickly.

Another issue that I did not note here is that, like any good programmer, I frequently relied on the internet to look up specific APIs. This means that I spent the majority of my time navigating away from the IDE (and Serenade), which tested Dictation’s coping capabilities. We’re not quite at the point of fully composing applications with voice (and there’s a long way to go before we can deploy them), but we’re getting closer.

This article is republished from hackernoon.


For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

root

Related Topics
  • css
  • Heroku
  • html
  • IDE
  • Programming
  • Serenade
  • Tutorials
  • Visual Studio Code
  • VS Code
You May Also Like
Getting things done makes her feel amazing
View Post
  • Computing
  • Data
  • Featured
  • Learning
  • Tech
  • Technology

Nurturing Minds in the Digital Revolution

  • April 25, 2025
View Post
  • Software
  • Technology

Canonical Releases Ubuntu 25.04 Plucky Puffin

  • April 17, 2025
View Post
  • Software
  • Technology

IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management

  • March 27, 2025
View Post
  • Tech

Deep dive into AI with Google Cloud’s global generative AI roadshow

  • February 18, 2025
Volvo Group: Confidently ahead at CES
View Post
  • Tech

Volvo Group: Confidently ahead at CES

  • January 8, 2025
zedreviews-ces-2025-social-meta
View Post
  • Featured
  • Gears
  • Tech
  • Technology

What Not to Miss at CES 2025

  • January 6, 2025
Vehicle manufacturing
View Post
  • Software

IBM Study: Vehicles Believed to be Software Defined and AI Powered by 2035

  • December 12, 2024
View Post
  • Tech

IBM and Pasqal Plan to Expand Quantum-Centric Supercomputing Initiative

  • November 21, 2024

Stay Connected!
LATEST
  • college-of-cardinals-2025 1
    The Definitive Who’s Who of the 2025 Papal Conclave
    • May 7, 2025
  • conclave-poster-black-smoke 2
    The World Is Revalidating Itself
    • May 6, 2025
  • 3
    Conclave: How A New Pope Is Chosen
    • April 25, 2025
  • Getting things done makes her feel amazing 4
    Nurturing Minds in the Digital Revolution
    • April 25, 2025
  • 5
    AI is automating our jobs – but values need to change if we are to be liberated by it
    • April 17, 2025
  • 6
    Canonical Releases Ubuntu 25.04 Plucky Puffin
    • April 17, 2025
  • 7
    United States Army Enterprise Cloud Management Agency Expands its Oracle Defense Cloud Services
    • April 15, 2025
  • 8
    Tokyo Electron and IBM Renew Collaboration for Advanced Semiconductor Technology
    • April 2, 2025
  • 9
    IBM Accelerates Momentum in the as a Service Space with Growing Portfolio of Tools Simplifying Infrastructure Management
    • March 27, 2025
  • 10
    Tariffs, Trump, and Other Things That Start With T – They’re Not The Problem, It’s How We Use Them
    • March 25, 2025
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    IBM contributes key open-source projects to Linux Foundation to advance AI community participation
    • March 22, 2025
  • 2
    Co-op mode: New partners driving the future of gaming with AI
    • March 22, 2025
  • 3
    Mitsubishi Motors Canada Launches AI-Powered “Intelligent Companion” to Transform the 2025 Outlander Buying Experience
    • March 10, 2025
  • PiPiPi 4
    The Unexpected Pi-Fect Deals This March 14
    • March 13, 2025
  • Nintendo Switch Deals on Amazon 5
    10 Physical Nintendo Switch Game Deals on MAR10 Day!
    • March 9, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.