Skip to content

Polish text and fix grammar after transcription #793

Open

Description

@mubaid

What are you trying to do?

I use the app's local speech-to-text feature to dictate text in English.

As a non-native English speaker, I often think in my native language and translate those thoughts into English while speaking. This can result in grammatically incorrect sentences, awkward phrasing, or unnatural sentence structures.

Currently, the app transcribes exactly what I say but does not improve the resulting text. This means I still have to manually review and correct the grammar after every transcription.

What would help?

An optional AI-powered post-transcription text refinement feature.

After local transcription is complete, the app could process the resulting text to:

  • Correct grammar and spelling mistakes.
  • Improve sentence structure and word order.
  • Fix awkward phrasing and make sentences sound more natural.
  • Improve punctuation and readability.
  • Preserve the original meaning, intent, and tone.

Ideally, this should work as a separate post-processing step, without changing the existing local speech-to-text functionality.

A simple toggle to enable or disable text refinement would be useful. It would also be good to have different refinement levels, such as grammar correction only or full text polishing.

This would make the app much more useful for non-native English speakers and anyone who relies on voice input for writing.

Activity

  1. thdxr commented on Nov 1, 2026

    @thdxr
    Member

    this mostly exists already: every mode can have an opencode rewrite step that runs after local transcription, and if it fails or times out the plain transcript pastes. a prompt like "fix grammar, spelling and punctuation, keep my wording and tone" on global gets you grammar-only, and a looser prompt gets you full polish. the output pane's edit with agent copies a prompt that names the right hex settings keys.

    • hex has no local text model, so refinement needs opencode running and sends the transcript to whatever provider it's set up with.
    • a local option would mean a new model and runtime, which is a lot bigger than a toggle.
    • built-in levels would be a new preset layer on top of modes, and that needs a design call first.

    is going through opencode ok for you, or do you need the refinement to stay fully on-device?

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

  2. added
    needs-designFeature that needs a closer look and design before we build it
    on Nov 1, 2026
  3. mubaid commented on Nov 1, 2026

    @mubaid
    Author

    Yes, using OpenCode would work for me. However, I'm not sure how to configure this or how to get the rewrite step working after local transcription.

    Could you provide a simple step-by-step guide or an example configuration?

    Ideally, I'd like to set it up once globally so that every transcription is automatically checked for grammar, spelling, and natural phrasing before it is pasted.

    I don't necessarily need a fully on-device solution if OpenCode can handle this reliably.

  4. thdxr commented on Nov 1, 2026

    @thdxr
    Member

    keep opencode running with a provider you're logged into. hex only talks to an opencode that's already running and never starts one itself. then in hex go to output › open file, find dictation_processing.default_mode.post_processing in settings.json, set "enabled": true and a "prompt" like "fix grammar, spelling and punctuation and smooth the phrasing, keep my meaning, tone and wording otherwise", and restart hex. leave "model" null and hex picks a fast model from opencode's list, or set a provider/model key yourself. that runs on every dictation, and if opencode isn't reachable or takes longer than deadline_seconds (30 by default) the plain transcript pastes. one catch: a mode you've set up for a specific app replaces global instead of adding to it, so give that mode the same post_processing block.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-designFeature that needs a closer look and design before we build it

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions