Skip to content

Commit 0372eaa

Browse files
committed
feat(api): add wav and pcm to response_format (#691)
1 parent e84773e commit 0372eaa

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/resources/audio/speech.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ export interface SpeechCreateParams {
3535
voice: 'alloy' | 'echo' | 'fable' | 'onyx' | 'nova' | 'shimmer';
3636

3737
/**
38-
* The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`.
38+
* The format to return audio in. Supported formats are `mp3`, `opus`, `aac`,
39+
* `flac`, `pcm`, and `wav`.
40+
*
41+
* The `pcm` audio format, similar to `wav` but without a header, utilizes a 24kHz
42+
* sample rate, mono channel, and 16-bit depth in signed little-endian format.
3943
*/
40-
response_format?: 'mp3' | 'opus' | 'aac' | 'flac';
44+
response_format?: 'mp3' | 'opus' | 'aac' | 'flac' | 'pcm' | 'wav';
4145

4246
/**
4347
* The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is

0 commit comments

Comments
 (0)