Naming conventions are why most dictation tools are useless for code. Say "get user name" and you get "get user name" with spaces. Not getUserName. Not get_user_name. Just words.
Whisperer's Code Mode fixes this. Simple commands, correct output.
The Commands#
Four casing commands. Say the command, then your words:
camelCase#
“"camel case get user profile"”
getUserProfileFirst word lowercase, rest capitalized, no spaces.
snake_case#
“"snake case get user profile"”
get_user_profileAll lowercase with underscores.
PascalCase#
“"pascal case user service"”
UserServiceEvery word capitalized. Class names, mostly.
CONSTANT_CASE#
“"constant case max retry count"”
MAX_RETRY_COUNTAll caps, underscores. Constants.
Examples#
JavaScript / TypeScript#
“"const camel case is loading equals false semicolon"”
const isLoading = false;“"function camel case handle submit open paren event colon pascal case form event close paren"”
function handleSubmit(event: FormEvent)Python#
“"def snake case calculate total price open paren items colon list comma tax rate colon float close paren arrow float colon"”
def calculate_total_price(items: list, tax_rate: float) -> float:Mixing Casing and Symbols#
“"if camel case is valid open paren camel case user input close paren open brace"”
if isValid(userInput) {“"self dot snake case api client dot snake case send request open paren url close paren"”
self.api_client.send_request(url)Tips#
Casing Applies Until Interrupted
The casing command covers words until you hit a symbol or say a different casing command.
No Pause Needed
Just keep talking. "Camel case get user profile" all in one breath.
Numbers Work
"camel case get user two" gives you getUser2.
Dictionary
Add identifiers you use a lot. Faster recognition.
When to Use What#
| Convention | Use | Languages |
|---|---|---|
| camelCase | Variables, functions | JavaScript, TypeScript, Java |
| snake_case | Variables, functions | Python, Rust, Ruby |
| PascalCase | Classes, types | Most |
| CONSTANT_CASE | Constants, env vars | All |
Practice#
An hour of practice and this becomes automatic. Try these:
“"const camel case fetch user data equals async open paren close paren fat arrow open brace"”
const fetchUserData = async () => {“"def snake case create new account open paren email colon str close paren colon"”
def create_new_account(email: str):“"class pascal case user auth service open brace"”
class UserAuthService {“"constant case max retry attempts equals three"”
MAX_RETRY_ATTEMPTS = 3Related: 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