Whisper API - seems to fail on Repl (but work on Google Colab)

I was trying out the new Whisper API’s (directly from OpenAI), and used the main documentation from the OpenAI site for this example.

I got a weird internal error when I attempted to run the same on repl (after installing the required libraries).

The same code worked perfectly fine on Colab
The documentation used is here OpenAI API

  File "main.py", line 3, in <module>
    transcript = openai.Audio.transcribe("whisper-1", "new_file.wav")
  File "/home/runner/WhisperTest/venv/lib/python3.10/site-packages/openai/api_resources/audio.py", line 55, in transcribe
    requestor, files, data = cls._prepare_request(file, file.name, model, **params)
AttributeError: 'str' object has no attribute 'name'

The code I ran was
import openai
openai.api_key = “token here”
transcript = openai.Audio.transcribe(“whisper-1”, “new_file.wav”)
print (transcript)

note : I have installed the package openai 0.27 (which is the latest version)