Skip to main content

TalkTone for Code

Pro Feature

TalkTone requires TalkWriter Pro or Enterprise. Upgrade to Pro โ†’

Code mode transforms your spoken explanations into developer-standard documentation -- code comments, API docs, READMEs, commit messages, and PR descriptions. Stop typing boilerplate. Just explain what your code does, and TalkTone formats it.


Code Mode Stylesโ€‹

Code Commentโ€‹

Produces concise inline comments following standard conventions.

What you say:

this function validates the email format using a regex and returns true if it matches and false if it does not also it trims whitespace before checking

TalkTone output:

// Validates email format against regex pattern.
// Trims leading/trailing whitespace before validation.
// Returns true if valid, false otherwise.

Best for: Inline code comments, function-level explanations, TODO annotations.


API Docsโ€‹

Produces JSDoc/Javadoc-style documentation with parameters, return types, and exceptions.

What you say:

this function takes a user ID which is a string and an options object that has an optional include deleted field which is a boolean and it returns a promise that resolves to a user profile object and it throws a not found error if the user does not exist

TalkTone output:

/**
* Retrieves a user profile by ID.
*
* @param {string} userId - The unique identifier of the user.
* @param {Object} options - Configuration options.
* @param {boolean} [options.includeDeleted=false] - Whether to include soft-deleted users.
* @returns {Promise<UserProfile>} The user's profile data.
* @throws {NotFoundError} If no user matches the provided ID.
*/

Best for: Function documentation, method signatures, API endpoint descriptions.


READMEโ€‹

Produces project documentation with clear sections, setup instructions, and feature lists.

What you say:

this project is a command line tool for converting markdown files to PDF it supports custom themes syntax highlighting and table of contents generation you install it with npm and run it with the convert command

TalkTone output:

## Overview

A command-line tool for converting Markdown files to PDF with support for custom themes, syntax highlighting, and automatic table of contents generation.

## Installation

npm install -g md-to-pdf

## Usage

md-to-pdf convert input.md --output result.pdf

## Features

- Custom theme support
- Syntax highlighting for code blocks
- Automatic table of contents generation

Best for: Project READMEs, feature documentation, setup guides.


Commit Messageโ€‹

Produces conventional commit format messages with type, scope, and description.

What you say:

added rate limiting to the transcription API endpoint using Redis with a limit of 100 requests per minute per user

TalkTone output:

feat(api): add Redis-based rate limiting to /api/transcribe

- Limit: 100 requests/min per user
- Uses Redis sliding window counter
- Returns 429 with Retry-After header when exceeded

What you say:

fixed the bug where the sidebar would not close on mobile when you tap outside of it

TalkTone output:

fix(ui): resolve sidebar not closing on outside tap (mobile)

Conventional commit types TalkTone uses:

TypeWhen Used
featNew feature or capability
fixBug fix
docsDocumentation changes
styleFormatting, no code change
refactorCode restructuring
perfPerformance improvement
testAdding or updating tests
choreMaintenance, dependencies

PR Descriptionโ€‹

Produces structured pull request descriptions with summary, changes, and testing sections.

What you say:

this PR adds dark mode support to the settings page users can toggle between light dark and system mode it also updates all the color tokens to support both themes and I added tests for the theme switching logic

TalkTone output:

## Summary

Adds dark mode support to the Settings page with light, dark, and system-preference toggle.

## Changes

- Added theme toggle component to Settings page
- Updated color tokens to support light/dark variants
- Implemented system preference detection via `prefers-color-scheme`
- Added unit tests for theme switching logic

## Testing

- [ ] Toggle between light, dark, and system modes
- [ ] Verify color tokens update across all components
- [ ] Test system preference detection on macOS and Windows
- [ ] Run unit tests: `npm test -- --grep "theme"`

Best for: Pull request descriptions, merge request summaries, code review context.


Developer Workflow Examplesโ€‹

Workflow 1: Document While You Codeโ€‹

  1. Write your function
  2. Switch to TalkTone Code mode with API Docs style
  3. Dictate what the function does
  4. Paste the generated documentation above your function
  5. Total time: ~15 seconds vs 2-3 minutes typing

Workflow 2: End-of-Day Commit Messagesโ€‹

  1. Finish your coding session
  2. Switch to Commit Message style
  3. Dictate what you changed for each file
  4. Copy each generated commit message into your git workflow

Workflow 3: PR Descriptions from Memoryโ€‹

  1. Open your PR
  2. Switch to PR Description style
  3. Dictate everything you remember about the changes
  4. TalkTone structures it into a proper PR template

Workflow 4: README from a Conversationโ€‹

  1. Someone asks "what does this project do?"
  2. Answer them naturally using dictation with README style
  3. Your spoken explanation becomes structured project documentation

TaskStyleFormattingIntensity
Inline code commentsCode CommentNeutralโšกโšก Medium
JSDoc/Javadoc documentationAPI DocsFormalโšกโšกโšก Full
Project READMEREADMENeutralโšกโšกโšก Full
Git commit messagesCommit MessageNeutralโšกโšกโšก Full
Pull request descriptionsPR DescriptionNeutralโšกโšก Medium
Code review commentsCode CommentCasualโšก Light
Technical specDocument mode, Technical styleFormalโšกโšกโšก Full

Custom Instructions for Developersโ€‹

Add these to your Custom Instructions for better code output:

Use TypeScript types in API documentation.
Follow conventional commits format (feat, fix, docs, refactor).
Include JSDoc @throws annotations for error cases.
Use imperative mood in commit messages ("add" not "added").
Keep code comments under 80 characters per line.

Tipsโ€‹

Dictate Parameters Clearly

When describing function parameters, say the type explicitly: "takes a string called user ID" produces better API Docs than "takes a user ID."

Use Full Rewrite for Commits

Commit messages have strict formatting conventions. Full Rewrite intensity ensures TalkTone follows conventional commit format exactly.

warning

Code mode generates documentation text, not executable code. It will not write functions, classes, or logic for you -- it documents what you describe.


Next Stepsโ€‹