null response returned when type=audio/wav is not supplied on multipart/form-data' upload. #8

Open
opened 2 years ago by androiddrew · 0 comments
Owner

The OpenAI Whisper Docs Suggests that

curl --request POST \
  --url http://localhost:9000/audio/transcriptions \
  --header 'Content-Type: multipart/form-data' \
  --form 'file=@/path/to/file/example.wav'
  --form 'model=whisper-1'

should be accepted. What I found was that the Content-Type of the uploaded file was 'application/octet-stream' resulting in an implicit None return value for the /audio/transcription endpoint. Like https://github.com/ahmetoner/whisper-asr-webservice we will probably need to add ffmpeg for resampling and support of additional file types.

We should also add support for --form response_format=text to return text responses instead of the default json.

The [OpenAI Whisper Docs](https://platform.openai.com/docs/guides/speech-to-text/quickstart?lang=curl) Suggests that ``` curl --request POST \ --url http://localhost:9000/audio/transcriptions \ --header 'Content-Type: multipart/form-data' \ --form 'file=@/path/to/file/example.wav' --form 'model=whisper-1' ``` should be accepted. What I found was that the Content-Type of the uploaded file was 'application/octet-stream' resulting in an implicit `None` return value for the `/audio/transcription` endpoint. Like https://github.com/ahmetoner/whisper-asr-webservice we will probably need to add ffmpeg for resampling and support of additional file types. We should also add support for `--form response_format=text` to return text responses instead of the default json.
androiddrew added the
bug
enhancement
labels 2 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: runcible/local-whisper#8
Loading…
There is no content yet.