ruby-openai icon indicating copy to clipboard operation
ruby-openai copied to clipboard

JSON::ParserError with different response_format - Whisper

Open felipeequaresma opened this issue 1 year ago • 1 comments

Describe the bug Whisper supports a few different response types like json, text, art, verbose json or vtt, when you set vtt for example it can't parse to json.

To Reproduce Steps to reproduce the behavior:

  1. Go to the terminal and to execute:
OpenAI::Client.new.transcribe(
        parameters: {
            model: 'whisper-1',
            file:  'your_file_path',
            response_format: 'vtt'
        })
  1. See error

Expected behavior response in all formats available for openAI

felipeequaresma avatar Jun 12 '23 00:06 felipeequaresma

Same issue,

JSON::ParserError: unexpected token at 'WEBVTT

When I request response_format: "vtt"

This 100% used to work in previous versions of this gem.

mrmattnewell avatar Sep 13 '23 10:09 mrmattnewell