ahmetoner / whisper-asr-webservice

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

Downloading the file, it gets html extension #192

Open resuarez opened 4 months ago

resuarez commented 4 months ago

I am using unraid, Whisper Asr Webservice 1.2.4 OAS 3.1 I use srt as output format. When, I tried to download the file, I always get response_###.html format, instead of srt file. I've just do manually and I get the file. But, I am wondering why it is not working if the content-disposition: attachment; filename="sample-0.mp3.srt" seem to be ok.

image

resuarez commented 4 months ago

I've tried in Edge and Chrome with same results.

blundercode commented 4 months ago

Tested and confirmed the same bug using that button.

A quick workaround is to temporarily use the Curl command to put it into and SRT file.

Example:

curl -o filename.srt \
  -X 'POST' \
  'http://localhost:9000/asr?encode=true&task=transcribe&language=en&vad_filter=true&word_timestamps=false&output=srt' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'audio_file=@filename.mp3;type=audio/mpeg'

Hopefully this helps.