News for hackers. Stuff that matters.
Re:Cleaning Up Speech Recognition with GPT by simonw on Friday April 26, 2024 @08:00PM (#40175686)
"I’ll probably write an elisp function to send the output to GPT and insert the results into the buffer"

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
Re:Cleaning Up Speech Recognition with GPT by fzzzy on Friday April 26, 2024 @08:31PM (#40175910)
Thanks a lot for llm, Simon. I've started to integrate it more and more in what I do as an abstraction layer over llm apis.

By the way, do you know of any models that support streaming input tokens to reduce latency to output tokens?

Re:Cleaning Up Speech Recognition with GPT by simonw on Saturday April 27, 2024 @02:36AM (#40177804)
I don't think I've seen one that does that.

Groq is pretty amazing to play with to see what fast models are like (llm-groq plugin).

Re:Cleaning Up Speech Recognition with GPT by fzzzy on Saturday April 27, 2024 @07:46AM (#40179218)
Thanks. The problem with groq is time to first token (being in a queue, presumably).
Re:Cleaning Up Speech Recognition with GPT by BeetleB on Friday April 26, 2024 @09:02PM (#40176114)
I wrote it in December, when I was none the wiser. I've already got an elisp function (using whisper now for the backend - which has some cons to it).

In fact, it's fairly common for me to use the combination of Whisper and GPT to compose emails, etc. I should do a followup post on my setup.

Interestingly, Simon, I also submitted another story[1] where I refer to your shot-scraper. You're the gift that keeps on giving (especially given that my first programming job was with Django in 2008!)

[1] https://news.ycombinator.com/item?id=40174802

Re:Cleaning Up Speech Recognition with GPT by jilijeanlouis on Saturday April 27, 2024 @03:21AM (#40177995)
BTW I’ve heard from researchers from a big GAFAM (can’t name) that they actually use gpt to do this on the ground truth and spot that correction and do a second pass of human labelling on the ground truth to have better dataset.
Re:Cleaning Up Speech Recognition with GPT by tedmiston on Saturday April 27, 2024 @11:11AM (#40180581)
Thanks for sharing this!

Direct link to the repo for those curious - https://github.com/simonw/llm