I suggest taking a look at my LLM command-line tool. It's great for cobbling together these kinds of things, because you can use whatever shell integration your environment has to pipe things to it.
cat bad-dictation.txt | \
llm -m gpt-4-turbo --system '
You are going to correct for text that
has been produced by voice recognition
software. Rewrite any text provided to
you. The text will not have punctuation,
so please add where needed. If the text
has the word period, then insert a
period, and do not insert another one
just before or after. If the text has
“new line” or “newline”, insert a newline
character and start a new paragraph. If
the text says “comma”, insert a comma. If
the text has a number spelled out,
replace it with the actual number. So
“five thousand” becomes “5000”. Also, if
something seems off in the text, it was
probably due to a misrecognized word.
Please correct for it.' > out.txt
Should be easy to call that from elisp, and you can then install plugins to have it talk to other models like Claude or Llama 3: https://llm.datasette.io/en/stable/plugins/directory.html