Skip to content

Commit

Permalink
TranscriptionVerbose.duration is a number, not a string
Browse files Browse the repository at this point in the history
The real API returns numbers, not strings.

[The API is also documented here](https://platform.openai.com/docs/api-reference/audio/verbose-json-object). That documentation partially makes the same mistake: it claims that `duration` is a string. However, it also shows this example: `"duration": 8.470000267028809`, in which the duration is a number.
  • Loading branch information
jameshfisher authored Oct 25, 2024
1 parent 813cb44 commit 1469be2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/resources/audio/transcriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export interface TranscriptionVerbose {
/**
* The duration of the input audio.
*/
duration: string;
duration: number;

/**
* The language of the input audio.
Expand Down

0 comments on commit 1469be2

Please sign in to comment.