Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "2.49.0"
".": "2.50.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 278
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-0650ebae454b4200491980d7663cb7ceabcff90dcb3ed9f67c3bca3e861a2bf6.yml
openapi_spec_hash: e9576bced964246b7e685a5ad30afffa
config_hash: 43e311595bcc4fb6b32eba0684de48d8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-9152683f2fa71f5555cbbb53123ec013b7c83ee6fed4333e76c22a6f48a05f1c.yml
openapi_spec_hash: c58a8c1bb1f5bb7245323db9437bd67f
config_hash: ca12d10f1dbe101a81cd0376f868c674
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 2.50.0 (2026-07-28)

Full Changelog: [v2.49.0...v2.50.0](https://github.com/openai/openai-python/compare/v2.49.0...v2.50.0)

### Features

* **api:** transcription model updates ([fd57393](https://github.com/openai/openai-python/commit/fd57393389eac75af08c2e887cb188590448be20))


### Bug Fixes

* **audio:** restore transcription keyword overload ([713a262](https://github.com/openai/openai-python/commit/713a2624966c40f4e5b0c20436b8a79aa8383b08))

## 2.49.0 (2026-07-27)

Full Changelog: [v2.48.0...v2.49.0](https://github.com/openai/openai-python/compare/v2.48.0...v2.49.0)
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ from openai.types.audio import (
TranscriptionDiarized,
TranscriptionDiarizedSegment,
TranscriptionInclude,
TranscriptionLanguage,
TranscriptionSegment,
TranscriptionStreamEvent,
TranscriptionTextDeltaEvent,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "2.49.0"
version = "2.50.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "2.49.0" # x-release-please-version
__version__ = "2.50.0" # x-release-please-version
82 changes: 76 additions & 6 deletions src/openai/resources/audio/transcriptions.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/openai/resources/webhooks/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ from openai.types.webhooks import (
FineTuningJobCancelledWebhookEvent,
FineTuningJobFailedWebhookEvent,
FineTuningJobSucceededWebhookEvent,
LiveCallIncomingWebhookEvent,
RealtimeCallIncomingWebhookEvent,
ResponseCancelledWebhookEvent,
ResponseCompletedWebhookEvent,
Expand Down
1 change: 1 addition & 0 deletions src/openai/types/audio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from .transcription_segment import TranscriptionSegment as TranscriptionSegment
from .transcription_verbose import TranscriptionVerbose as TranscriptionVerbose
from .transcription_diarized import TranscriptionDiarized as TranscriptionDiarized
from .transcription_language import TranscriptionLanguage as TranscriptionLanguage
from .translation_create_params import TranslationCreateParams as TranslationCreateParams
from .transcription_stream_event import TranscriptionStreamEvent as TranscriptionStreamEvent
from .transcription_create_params import TranscriptionCreateParams as TranscriptionCreateParams
Expand Down
8 changes: 8 additions & 0 deletions src/openai/types/audio/transcription.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ..._utils import PropertyInfo
from ..._models import BaseModel
from .transcription_language import TranscriptionLanguage

__all__ = ["Transcription", "Logprob", "Usage", "UsageTokens", "UsageTokensInputTokenDetails", "UsageDuration"]

Expand Down Expand Up @@ -70,6 +71,13 @@ class Transcription(BaseModel):
text: str
"""The transcribed text."""

languages: Optional[List[TranscriptionLanguage]] = None
"""The languages detected in the audio.

Returned by `gpt-transcribe`. An empty array indicates that no language could be
reliably detected.
"""

logprobs: Optional[List[Logprob]] = None
"""The log probabilities of the tokens in the transcription.

Expand Down
15 changes: 14 additions & 1 deletion src/openai/types/audio/transcription_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TranscriptionCreateParamsBase(TypedDict, total=False):
model: Required[Union[str, AudioModel]]
"""ID of the model to use.

The options are `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`,
The options are `gpt-transcribe`, `gpt-4o-transcribe`, `gpt-4o-mini-transcribe`,
`gpt-4o-mini-transcribe-2025-12-15`, `whisper-1` (which is powered by our open
source Whisper V2 model), and `gpt-4o-transcribe-diarize`.
"""
Expand All @@ -54,6 +54,12 @@ class TranscriptionCreateParamsBase(TypedDict, total=False):
not supported when using `gpt-4o-transcribe-diarize`.
"""

keywords: SequenceNotStr[str]
"""Words or phrases to guide transcription of the input audio.

Supported by `gpt-transcribe`.
"""

known_speaker_names: SequenceNotStr[str]
"""
Optional list of speaker names that correspond to the audio samples provided in
Expand All @@ -78,6 +84,13 @@ class TranscriptionCreateParamsBase(TypedDict, total=False):
format will improve accuracy and latency.
"""

languages: SequenceNotStr[str]
"""
Possible languages of the input audio, in
[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
Supported by `gpt-transcribe`.
"""

prompt: str
"""An optional text to guide the model's style or continue a previous audio
segment.
Expand Down
12 changes: 12 additions & 0 deletions src/openai/types/audio/transcription_language.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from ..._models import BaseModel

__all__ = ["TranscriptionLanguage"]


class TranscriptionLanguage(BaseModel):
"""A language detected in transcribed audio."""

code: str
"""The code of a language detected in the audio."""
8 changes: 8 additions & 0 deletions src/openai/types/audio/transcription_text_done_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing_extensions import Literal

from ..._models import BaseModel
from .transcription_language import TranscriptionLanguage

__all__ = ["TranscriptionTextDoneEvent", "Logprob", "Usage", "UsageInputTokenDetails"]

Expand Down Expand Up @@ -60,6 +61,13 @@ class TranscriptionTextDoneEvent(BaseModel):
type: Literal["transcript.text.done"]
"""The type of the event. Always `transcript.text.done`."""

languages: Optional[List[TranscriptionLanguage]] = None
"""The languages detected in the audio.

Returned by `gpt-transcribe`. An empty array indicates that no language could be
reliably detected.
"""

logprobs: Optional[List[Logprob]] = None
"""The log probabilities of the individual tokens in the transcription.

Expand Down
1 change: 1 addition & 0 deletions src/openai/types/audio_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

AudioModel: TypeAlias = Literal[
"whisper-1",
"gpt-transcribe",
"gpt-4o-transcribe",
"gpt-4o-mini-transcribe",
"gpt-4o-mini-transcribe-2025-12-15",
Expand Down
25 changes: 20 additions & 5 deletions src/openai/types/realtime/audio_transcription.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Union, Optional
from typing import List, Union, Optional
from typing_extensions import Literal

from ..._models import BaseModel
Expand All @@ -16,6 +16,12 @@ class AudioTranscription(BaseModel):
with `gpt-realtime-whisper` in GA Realtime sessions.
"""

keywords: Optional[List[str]] = None
"""Words or phrases to guide transcription of the input audio.

Supported by `gpt-transcribe` and `gpt-live-transcribe`.
"""

language: Optional[str] = None
"""The language of the input audio.

Expand All @@ -24,10 +30,19 @@ class AudioTranscription(BaseModel):
format will improve accuracy and latency.
"""

languages: Optional[List[str]] = None
"""
Possible languages of the input audio, in
[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
Supported by `gpt-transcribe` and `gpt-live-transcribe`.
"""

model: Union[
str,
Literal[
"whisper-1",
"gpt-transcribe",
"gpt-live-transcribe",
"gpt-4o-mini-transcribe",
"gpt-4o-mini-transcribe-2025-12-15",
"gpt-4o-transcribe",
Expand All @@ -38,10 +53,10 @@ class AudioTranscription(BaseModel):
] = None
"""The model to use for transcription.

Current options are `whisper-1`, `gpt-4o-mini-transcribe`,
`gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`,
`gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use
`gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`,
`gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`,
`gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.
Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
"""

prompt: Optional[str] = None
Expand Down
25 changes: 21 additions & 4 deletions src/openai/types/realtime/audio_transcription_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
from typing import Union
from typing_extensions import Literal, TypedDict

from ..._types import SequenceNotStr

__all__ = ["AudioTranscriptionParam"]


Expand All @@ -16,6 +18,12 @@ class AudioTranscriptionParam(TypedDict, total=False):
with `gpt-realtime-whisper` in GA Realtime sessions.
"""

keywords: SequenceNotStr[str]
"""Words or phrases to guide transcription of the input audio.

Supported by `gpt-transcribe` and `gpt-live-transcribe`.
"""

language: str
"""The language of the input audio.

Expand All @@ -24,10 +32,19 @@ class AudioTranscriptionParam(TypedDict, total=False):
format will improve accuracy and latency.
"""

languages: SequenceNotStr[str]
"""
Possible languages of the input audio, in
[ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
Supported by `gpt-transcribe` and `gpt-live-transcribe`.
"""

model: Union[
str,
Literal[
"whisper-1",
"gpt-transcribe",
"gpt-live-transcribe",
"gpt-4o-mini-transcribe",
"gpt-4o-mini-transcribe-2025-12-15",
"gpt-4o-transcribe",
Expand All @@ -37,10 +54,10 @@ class AudioTranscriptionParam(TypedDict, total=False):
]
"""The model to use for transcription.

Current options are `whisper-1`, `gpt-4o-mini-transcribe`,
`gpt-4o-mini-transcribe-2025-12-15`, `gpt-4o-transcribe`,
`gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`. Use
`gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
Current options are `whisper-1`, `gpt-transcribe`, `gpt-live-transcribe`,
`gpt-4o-mini-transcribe`, `gpt-4o-mini-transcribe-2025-12-15`,
`gpt-4o-transcribe`, `gpt-4o-transcribe-diarize`, and `gpt-realtime-whisper`.
Use `gpt-4o-transcribe-diarize` when you need diarization with speaker labels.
"""

prompt: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ..._models import BaseModel
from .log_prob_properties import LogProbProperties
from ..audio.transcription_language import TranscriptionLanguage

__all__ = [
"ConversationItemInputAudioTranscriptionCompletedEvent",
Expand Down Expand Up @@ -94,5 +95,12 @@ class ConversationItemInputAudioTranscriptionCompletedEvent(BaseModel):
model's pricing rather than the realtime model's pricing.
"""

languages: Optional[List[TranscriptionLanguage]] = None
"""The languages detected in the audio.

Returned by `gpt-transcribe`. An empty array indicates that no language could be
reliably detected.
"""

logprobs: Optional[List[LogProbProperties]] = None
"""The log probabilities of the transcription."""
1 change: 1 addition & 0 deletions src/openai/types/webhooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from .response_failed_webhook_event import ResponseFailedWebhookEvent as ResponseFailedWebhookEvent
from .eval_run_canceled_webhook_event import EvalRunCanceledWebhookEvent as EvalRunCanceledWebhookEvent
from .eval_run_succeeded_webhook_event import EvalRunSucceededWebhookEvent as EvalRunSucceededWebhookEvent
from .live_call_incoming_webhook_event import LiveCallIncomingWebhookEvent as LiveCallIncomingWebhookEvent
from .response_cancelled_webhook_event import ResponseCancelledWebhookEvent as ResponseCancelledWebhookEvent
from .response_completed_webhook_event import ResponseCompletedWebhookEvent as ResponseCompletedWebhookEvent
from .response_incomplete_webhook_event import ResponseIncompleteWebhookEvent as ResponseIncompleteWebhookEvent
Expand Down
55 changes: 55 additions & 0 deletions src/openai/types/webhooks/live_call_incoming_webhook_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing_extensions import Literal

from ..._models import BaseModel

__all__ = ["LiveCallIncomingWebhookEvent", "Data", "DataSipHeader"]


class DataSipHeader(BaseModel):
"""A header from the SIP Invite."""

name: str
"""Name of the SIP Header."""

value: str
"""Value of the SIP Header."""


class Data(BaseModel):
"""Event data payload."""

session_id: str
"""The Transceiver `rtc_...` ID of the pending SIP session.

The same value appears as `call_id` in `realtime.call.incoming`.
"""

sip_headers: List[DataSipHeader]
"""Headers from the SIP Invite."""


class LiveCallIncomingWebhookEvent(BaseModel):
"""Sent when an incoming API SIP session is available for Live acceptance.

The
same pending session can also emit `realtime.call.incoming`; the first
successful Realtime or Live accept endpoint selects the runtime surface.
"""

id: str
"""The unique ID of the event."""

created_at: int
"""The Unix timestamp (in seconds) of when the event was created."""

data: Data
"""Event data payload."""

type: Literal["live.call.incoming"]
"""The type of the event. Always `live.call.incoming`."""

object: Optional[Literal["event"]] = None
"""The object of the event. Always `event`."""
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,21 @@ class Data(BaseModel):
"""Event data payload."""

call_id: str
"""The unique ID of this call."""
"""The Transceiver `rtc_...` ID of the pending SIP session.

The same value appears as `session_id` in `live.call.incoming`.
"""

sip_headers: List[DataSipHeader]
"""Headers from the SIP Invite."""


class RealtimeCallIncomingWebhookEvent(BaseModel):
"""Sent when Realtime API Receives a incoming SIP call."""
"""
Sent when an incoming API SIP session is available for Realtime acceptance.
The same pending session can also emit `live.call.incoming`; the first
successful Realtime or Live accept endpoint selects the runtime surface.
"""

id: str
"""The unique ID of the event."""
Expand Down
Loading
Loading