ahmetoner / whisper-asr-webservice

OpenAI Whisper ASR Webservice API
https://ahmetoner.github.io/whisper-asr-webservice
MIT License
1.99k stars 357 forks source link

faster_whisper and openai_whisper have differently formatted responses #209

Open bscholer opened 5 months ago

bscholer commented 5 months ago

While looking into this issue, I noticed that faster_whisper and openai_whisper now respond in different formats when output=json.

It looks like ASR_ENGINE=openai_whisper returns a structure that looks like this (notice the named fields in the segments array): image

On the other hand, ASR_ENGINE=faster_whisper instead returns a structure that looks like this (notice the lack of named fields in segments). image

I think it goes without saying, but the format used by openai_whisper offers a significantly improved DX. I'm not sure what is involved in getting faster_whisper to respond with similarly formatted JSON, but that strikes me as the path forward.