Live data from Hacker News

OpenAI charges by the minute, so speed up your audio

george.mand.is

101–110 of 234 posts

Re: OpenAI charges by the minute, so speed up your audio

#102
post #28

Why would you give up your privacy by sending what interests you to OpenAI when whisper doesn't need that much computer in the first place? With faster-whisper (int8, batch=8) you can transcripe 13 minutes of audio in 51 seconds on CPU .

I came here to ask the same question. This is a well-solved problem, red queen racing it seems utterly pointless, a symptom of reflexive adversarialism.

> symptom of reflexive adversarialism

Is there a definition for this expression? I don't catch you.

> ... using corporate technology for the solved problem is a symptom of self-directed skepticism by the user against the corporate institutions ...

Eh?

Re: OpenAI charges by the minute, so speed up your audio

#103
post #93
post #23

Earlier quoted context omitted.

In the meantime I realized that the apad part is nonsensical - it pads the end of the stream, not at each silence-removed cut. I wanted to get angry at o3 for proposing this, but then I had a look at the silenceremove= documentation myself: https://ffmpeg.org/ffmpeg-filters.html#silenceremove Good god. You couldn't make that any more convoluted and hard-to-grasp if you wanted to. You gotta love ffmpeg! I now think th…

Out of curiosity, how might you improve those docs? They seem fairly reasonable to me

The documentation reads like it was written by a programmer who documented the different parameters to their implementation of a specific algorithm. Now when you as the user come along and want to use silenceremove, you'll have to carefully read through this, and build your own mental model of that algorithm, and then you'll be able to set these parameters accordingly. That takes a lot of time and energy, in this case multiple read-throughs and I'd say > 5 minutes.

Good documentation should do this work for you. It should explain somewhat atomic concepts to you, that you can immediately adapt, and compose. Where it already works is for the "detection" and "window" parameters, which are straightforward. But the actions of trimming in the start/middle/end, and how to configure how long the silence lasts before trimming, whether to ignore short bursts of noise, whether to skip every nth silence period, these are all ideas and concepts that get mushed together in 10 parameters which are called start/stop-duration/threshold/silence/mode/periods.

If you want to apply this filter, it takes a long time to build mental models for these 10 parameters. You do have some example calls, which is great, but which doesn't help if you need to adjust any of these - then you probably need to understand them all.

Some stuff I stumbled over when reading it:

"To remove silence from the middle of a file, specify a stop_periods that is negative. This value is then treated as a positive value [...]" - what? Why is this parameter so heavily overloaded?

"start_duration: Specify the amount of time that non-silence must be detected before it stops trimming audio" - parameter is named start_something, but it's about stopping? Why?

"start_periods: [...] Normally, [...] start_periods will be 1 [...]. Default value is 0."

"start_mode: Specify mode of detection of silence end at start": start_mode end at start?

It's very clunky. Every parameter has multiple modes of operation. Why is it start and stop for beginning and end, and why is "do stuff in the middle" part of the end? Why is there no global mode?

You could nitpick this stuff to death. In the end, naming things is famously one of the two hard problems in computer science (the others being cache invalidation and off-by-one errors). And writing good documentation is also very, very hard work. Just exposing the internals of the algorithm is often not great UX, because then every user has to learn how the thing works internally before they can start using it (hey, looking at you, git).

So while it's easy to point out where these docs fail, it would be a lot of work to rewrite this documentation from the top down, explaining the concepts first. Or even rewriting the interface to make this more approachable, and the parameters less overloaded. But since it's hard work, and not sexy to programmers, it won't get done, and many people will come after, having to spend time on reading and re-reading this current mess.

Re: OpenAI charges by the minute, so speed up your audio

#104
post #33

For anybody trying to do this in bulk, instead of using OpenAI's whisper via their API, you can also use Groq [0] which is much cheaper: [0] https://groq.com/pricing/ Groq is ~$0.02/hr with distil-large-v3, or ~$0.04/hr with whisper-large-v3-turbo. I believe OpenAI comes out to like ~$0.36/hr. We do this internally with our tool that automatically transcribes local government council meetings right when they get uplo…

You could use Hugging Face's Inference API (which supports all of these API providers) directly making it easier to switch between them, e.g. look at the panel on the right on: https://huggingface.co/openai/whisper-large-v3

Re: OpenAI charges by the minute, so speed up your audio

#105

Earlier quoted context omitted.

> His natural talking speed is already >=1.5x that of a normal human. One of the people you absolutely have to set your YouTube speed back down to 1x when listening to follow what's going on. I wonder if there's a way to automatically detect how "fast" a person talks in an audio file. I know it's subjective and different people talk at different paces in an audio, but it'd be cool to kinda know when OP's trick fails…

It's a shame platforms don't generally support speeds greater than 2x. One of my "superpowers" or a curse is that I cannot stand normal speaking pace. When I watch lectures, I always go for maximum speed and that still is too slow for me. I wish platforms have included 4x but done properly (with minimal artefacts).

Can't you use VLC to watch almost anything streamable, and then play at your desired speed?

Re: OpenAI charges by the minute, so speed up your audio

#106
post #96
post #13

With transcribing a talk by Andrej, you already picked the most challenging case possible, speed-wise. His natural talking speed is already >=1.5x that of a normal human. One of the people you absolutely have to set your YouTube speed back down to 1x when listening to follow what's going on. In the idea of making more of an OpenAI minute, don't send it any silence. E.g. ffmpeg -i video-audio.m4a \ -af "silenceremove=…

> I didn't look at all at the quality of the transcription by feeding it the shorter version. guys how hard is it to toss both versions into like diffchecker or something haha youre just comparing text

Why use diffchecker when there’s a perfectly good LLM you could ask right there? lol

Re: OpenAI charges by the minute, so speed up your audio

#107
This is great, thank you for sharing. I work on these APIs at OpenAI, it's a surprise to me that it still works reasonably well at 2/3x speed, but on the other hand for phone channels we get 8khz audio that is upsampled to 24khz for the model and it still works well. Note there's probably a measurable decrease in transcription accuracy that worsens as you deviate from 1x speed. Also we really need to support bigger/longer file uploads :)

Re: OpenAI charges by the minute, so speed up your audio

#108

Earlier quoted context omitted.

You could have kept quiet and started a cheaper than openai transcription business :)

I've already done that [1]. A fraction of the price, 24-hour limit per file, and speedup tricks like the OP's are welcome. :) [1] https://speechischeap.com

Nice. Don't expect you to spill the beans but is it doing OK (some customers?)

Just wondering if I cam build a retirement out of APIs :)

Re: OpenAI charges by the minute, so speed up your audio

#109
post #18
post #15

Earlier quoted context omitted.

Seriously this is bonkers to me. I, like many hackers, hated school because they just threw one-size-fits-all knowledge at you and here we are, paying for the privilege to have that in every facet of our lives. Reading is a pleasure. Watching a lecture or a talk and feeling the pieces fall into place is great. Having your brain work out the meaning of things is surely something that defines us as a species. We're wil…

If you're not listening to summaries of different audiobooks at 2x speed in each ear you're not contentmaxing.

Or just use notebookLM to convert your books into an hour long podcasts /s

Re: OpenAI charges by the minute, so speed up your audio

#110

This is great, thank you for sharing. I work on these APIs at OpenAI, it's a surprise to me that it still works reasonably well at 2/3x speed, but on the other hand for phone channels we get 8khz audio that is upsampled to 24khz for the model and it still works well. Note there's probably a measurable decrease in transcription accuracy that worsens as you deviate from 1x speed. Also we really need to support bigger/l…

Quick Feedback: Would it be cool to research this internally and maybe find a sweet spot in speed multiplier where the loss is minimal. This pre-processing is quite cheap and could bring down the API price eventually.
Post reply on HN