Skip to content

Commit

Permalink
fix: file format detection failed for whisper
Browse files Browse the repository at this point in the history
Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
  • Loading branch information
thiswillbeyourgithub committed Nov 10, 2023
1 parent 45f60e8 commit 83a4cda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/openai/cli/_api/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def transcribe(args: CLITranscribeArgs) -> None:
buffer_reader = BufferReader(file_reader.read(), desc="Upload progress")

model = get_client().audio.transcriptions.create(
file=buffer_reader,
file=(args.file, buffer_reader),
model=args.model,
language=args.language or NOT_GIVEN,
temperature=args.temperature or NOT_GIVEN,
Expand All @@ -83,7 +83,7 @@ def translate(args: CLITranslationArgs) -> None:
buffer_reader = BufferReader(file_reader.read(), desc="Upload progress")

model = get_client().audio.translations.create(
file=buffer_reader,
file=(args.file, buffer_reader),
model=args.model,
temperature=args.temperature or NOT_GIVEN,
prompt=args.prompt or NOT_GIVEN,
Expand Down

0 comments on commit 83a4cda

Please sign in to comment.