March 1, 20263 min read

    How to Dictate camelCase and snake_case by Voice on Mac

    Programming naming conventions are one of the biggest barriers to voice coding. Standard dictation tools have no concept of camelCase, snake_case, or CONSTANT_CASE. They just produce space-separated words with default capitalization.

    Whisperer's Code Mode solves this with simple voice commands.

    The Casing Commands#

    Code Mode recognizes four casing commands. Say the command followed by the words you want converted:

    camelCase#

    You say

    "camel case get user profile"

    OutputJavaScript
    getUserProfile

    The first word is lowercase, subsequent words are capitalized, no spaces.

    snake_case#

    You say

    "snake case get user profile"

    OutputPython
    get_user_profile

    All lowercase, separated by underscores.

    PascalCase#

    You say

    "pascal case user service"

    OutputTypeScript
    UserService

    Each word capitalized, no spaces. Used for class names in most languages.

    CONSTANT_CASE#

    You say

    "constant case max retry count"

    OutputAny
    MAX_RETRY_COUNT

    All uppercase, separated by underscores. Used for constants.

    Real-World Examples#

    JavaScript / TypeScript#

    You say

    "const camel case is loading equals false semicolon"

    OutputJavaScript
    const isLoading = false;
    You say

    "function camel case handle submit open paren event colon pascal case form event close paren"

    OutputTypeScript
    function handleSubmit(event: FormEvent)

    Python#

    You say

    "def snake case calculate total price open paren items colon list comma tax rate colon float close paren arrow float colon"

    OutputPython
    def calculate_total_price(items: list, tax_rate: float) -> float:

    Combining Casing with Symbols#

    You say

    "if camel case is valid open paren camel case user input close paren open brace"

    OutputJavaScript
    if isValid(userInput) {
    You say

    "self dot snake case api client dot snake case send request open paren url close paren"

    OutputPython
    self.api_client.send_request(url)

    Tips for Natural Flow#

    Continuous Application

    The casing command applies to the following words until a symbol or new casing command interrupts it.

    No Pausing Needed

    You don't need to pause between the casing command and the words — speak naturally.

    Numbers Work Too

    "camel case get user two" produces getUser2.

    Personal Dictionary

    Add common identifiers you use frequently for even faster recognition.

    When to Use Each Convention#

    ConventionWhen to UseLanguages
    camelCaseVariables, functionsJavaScript, TypeScript, Java
    snake_caseVariables, functionsPython, Rust, Ruby
    PascalCaseClasses, typesMost languages
    CONSTANT_CASEConstants, env varsAll languages

    Practice Exercise#

    Tip

    Try dictating these common patterns by voice. Within an hour of practice, they become second nature.

    You say

    "const camel case fetch user data equals async open paren close paren fat arrow open brace"

    OutputTypeScript
    const fetchUserData = async () => {
    You say

    "def snake case create new account open paren email colon str close paren colon"

    OutputPython
    def create_new_account(email: str):
    You say

    "class pascal case user auth service open brace"

    OutputJava
    class UserAuthService {
    You say

    "constant case max retry attempts equals three"

    OutputAny
    MAX_RETRY_ATTEMPTS = 3

    Related: How to Dictate Code on Mac, Code Mode, Voice Coding Guide, Voice to Text for Developers. See pricing.

    Ready to try voice dictation on your Mac?

    Free download. No account required. 100% offline.

    Download on the Mac App Store

    Related articles

    Ready to ditch typing?

    Join developers and power users who dictate faster than they type. One-time purchase. No subscription. No cloud.

    Free trial included. Pro Pack $14.99 lifetime.