|
8 | 8 | import httpx
|
9 | 9 |
|
10 | 10 | from ... import _legacy_response
|
| 11 | +from ...types import AudioResponseFormat |
11 | 12 | from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes
|
12 | 13 | from ..._utils import (
|
13 | 14 | extract_files,
|
|
22 | 23 | from ..._base_client import make_request_options
|
23 | 24 | from ...types.audio_model import AudioModel
|
24 | 25 | from ...types.audio.transcription import Transcription
|
| 26 | +from ...types.audio_response_format import AudioResponseFormat |
25 | 27 |
|
26 | 28 | __all__ = ["Transcriptions", "AsyncTranscriptions"]
|
27 | 29 |
|
@@ -53,7 +55,7 @@ def create(
|
53 | 55 | model: Union[str, AudioModel],
|
54 | 56 | language: str | NotGiven = NOT_GIVEN,
|
55 | 57 | prompt: str | NotGiven = NOT_GIVEN,
|
56 |
| - response_format: Literal["json", "text", "srt", "verbose_json", "vtt"] | NotGiven = NOT_GIVEN, |
| 58 | + response_format: AudioResponseFormat | NotGiven = NOT_GIVEN, |
57 | 59 | temperature: float | NotGiven = NOT_GIVEN,
|
58 | 60 | timestamp_granularities: List[Literal["word", "segment"]] | NotGiven = NOT_GIVEN,
|
59 | 61 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -83,8 +85,8 @@ def create(
|
83 | 85 | [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
|
84 | 86 | should match the audio language.
|
85 | 87 |
|
86 |
| - response_format: The format of the transcript output, in one of these options: `json`, `text`, |
87 |
| - `srt`, `verbose_json`, or `vtt`. |
| 88 | + response_format: The format of the output, in one of these options: `json`, `text`, `srt`, |
| 89 | + `verbose_json`, or `vtt`. |
88 | 90 |
|
89 | 91 | temperature: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the
|
90 | 92 | output more random, while lower values like 0.2 will make it more focused and
|
@@ -160,7 +162,7 @@ async def create(
|
160 | 162 | model: Union[str, AudioModel],
|
161 | 163 | language: str | NotGiven = NOT_GIVEN,
|
162 | 164 | prompt: str | NotGiven = NOT_GIVEN,
|
163 |
| - response_format: Literal["json", "text", "srt", "verbose_json", "vtt"] | NotGiven = NOT_GIVEN, |
| 165 | + response_format: AudioResponseFormat | NotGiven = NOT_GIVEN, |
164 | 166 | temperature: float | NotGiven = NOT_GIVEN,
|
165 | 167 | timestamp_granularities: List[Literal["word", "segment"]] | NotGiven = NOT_GIVEN,
|
166 | 168 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
@@ -190,8 +192,8 @@ async def create(
|
190 | 192 | [prompt](https://platform.openai.com/docs/guides/speech-to-text/prompting)
|
191 | 193 | should match the audio language.
|
192 | 194 |
|
193 |
| - response_format: The format of the transcript output, in one of these options: `json`, `text`, |
194 |
| - `srt`, `verbose_json`, or `vtt`. |
| 195 | + response_format: The format of the output, in one of these options: `json`, `text`, `srt`, |
| 196 | + `verbose_json`, or `vtt`. |
195 | 197 |
|
196 | 198 | temperature: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the
|
197 | 199 | output more random, while lower values like 0.2 will make it more focused and
|
|
0 commit comments