Skip to content

Commit 6626656

Browse files
authored
chore(api): clarify Realtime audio noise reduction (#4331)
## Summary Documents how to select or disable input audio noise reduction in a Realtime session. ## Changes - Set the noise reduction type to near_field or far_field when supplying a configuration. - Set noise reduction to null to turn it off. Co-authored-by: dpiet-oai <326640584+dpiet-oai@users.noreply.github.com>
1 parent 621fd09 commit 6626656

5 files changed

Lines changed: 29 additions & 26 deletions

File tree

‎.castiron.stats.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schema_version: 1
2-
generation_id: d9049969-0cf9-4f87-9dd7-5fed0bfc68d9
3-
openapi_spec_hash: c5f2eb15c3e629a8cad937c0e73c3402
4-
openapi_transformed_spec_hash: be45f3f62fd3c06b3985fe5f702f0f1b
2+
generation_id: bffd8e2f-b304-4441-95e9-c5589462fd88
3+
openapi_spec_hash: 8ab963813bdcf6ea8b04d9a14c1903c8
4+
openapi_transformed_spec_hash: 543c09b4b1af07cb5180e0367554ff77
55
config_hash: 98b84a99474d4d011c1aaa92435f067a
6-
codegen_sha: 17e42a236316c86c457d091208ab4e37364c54a3
7-
codegen_hash: ff9f9c99cf94217f67d19ec0da11288c9c94c3d436b70d47bfc2a05fa7d069e5
6+
codegen_sha: 13da5ceb6a92d33339bc00662b09d7940de5683f
7+
codegen_hash: 4b5ad00e7cce820b33216741c133d64ac16c8ca6fda10f29974b43f28443a7e9

‎api_reference/openapi.transformed.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63357,7 +63357,8 @@ components:
6335763357
strength:
6335863358
$ref: '#/components/schemas/RealtimeNoiseReductionStrength'
6335963359
description: |
63360-
Configuration for input audio noise reduction. This can be set to `null` to turn off.
63360+
When you supply a `noise_reduction` object, you must set `type` to `near_field` or `far_field`.
63361+
Set `noise_reduction` to `null` to turn off input audio noise reduction.
6336163362
Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
6336263363
Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
6336363364
turn_detection:

‎scripts/castiron/generated-files.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5423,11 +5423,11 @@
54235423
},
54245424
"src/openai/types/realtime/realtime_audio_config_input.py": {
54255425
"mode": "100644",
5426-
"sha256": "5ffafdd1d8d7e04c8b9a46c54444496944c8c7055d766c51e18b8929b35fb5ab"
5426+
"sha256": "72492757c43223ba28a596025d8eaed2199528e3e46b4021f07171d36a7769b2"
54275427
},
54285428
"src/openai/types/realtime/realtime_audio_config_input_param.py": {
54295429
"mode": "100644",
5430-
"sha256": "dc9f18cbc51e5dd6ab035550cb4193432b7b9b9cd680dd728247b0bef9f38b1b"
5430+
"sha256": "92fcc9a66e58152dcfac8ff124e1172d9cb7260a95cb38caf373a3ca43d14984"
54315431
},
54325432
"src/openai/types/realtime/realtime_audio_config_output.py": {
54335433
"mode": "100644",

‎src/openai/types/realtime/realtime_audio_config_input.py‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313

1414
class NoiseReduction(BaseModel):
15-
"""Configuration for input audio noise reduction.
16-
17-
This can be set to `null` to turn off.
15+
"""
16+
When you supply a `noise_reduction` object, you must set `type` to `near_field` or `far_field`.
17+
Set `noise_reduction` to `null` to turn off input audio noise reduction.
1818
Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
1919
Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
2020
"""
@@ -40,12 +40,13 @@ class RealtimeAudioConfigInput(BaseModel):
4040
"""The format of the input audio."""
4141

4242
noise_reduction: Optional[NoiseReduction] = None
43-
"""Configuration for input audio noise reduction.
44-
45-
This can be set to `null` to turn off. Noise reduction filters audio added to
46-
the input audio buffer before it is sent to VAD and the model. Filtering the
47-
audio can improve VAD and turn detection accuracy (reducing false positives) and
48-
model performance by improving perception of the input audio.
43+
"""
44+
When you supply a `noise_reduction` object, you must set `type` to `near_field`
45+
or `far_field`. Set `noise_reduction` to `null` to turn off input audio noise
46+
reduction. Noise reduction filters audio added to the input audio buffer before
47+
it is sent to VAD and the model. Filtering the audio can improve VAD and turn
48+
detection accuracy (reducing false positives) and model performance by improving
49+
perception of the input audio.
4950
"""
5051

5152
transcription: Optional[AudioTranscription] = None

‎src/openai/types/realtime/realtime_audio_config_input_param.py‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515

1616
class NoiseReduction(TypedDict, total=False):
17-
"""Configuration for input audio noise reduction.
18-
19-
This can be set to `null` to turn off.
17+
"""
18+
When you supply a `noise_reduction` object, you must set `type` to `near_field` or `far_field`.
19+
Set `noise_reduction` to `null` to turn off input audio noise reduction.
2020
Noise reduction filters audio added to the input audio buffer before it is sent to VAD and the model.
2121
Filtering the audio can improve VAD and turn detection accuracy (reducing false positives) and model performance by improving perception of the input audio.
2222
"""
@@ -42,12 +42,13 @@ class RealtimeAudioConfigInputParam(TypedDict, total=False):
4242
"""The format of the input audio."""
4343

4444
noise_reduction: NoiseReduction
45-
"""Configuration for input audio noise reduction.
46-
47-
This can be set to `null` to turn off. Noise reduction filters audio added to
48-
the input audio buffer before it is sent to VAD and the model. Filtering the
49-
audio can improve VAD and turn detection accuracy (reducing false positives) and
50-
model performance by improving perception of the input audio.
45+
"""
46+
When you supply a `noise_reduction` object, you must set `type` to `near_field`
47+
or `far_field`. Set `noise_reduction` to `null` to turn off input audio noise
48+
reduction. Noise reduction filters audio added to the input audio buffer before
49+
it is sent to VAD and the model. Filtering the audio can improve VAD and turn
50+
detection accuracy (reducing false positives) and model performance by improving
51+
perception of the input audio.
5152
"""
5253

5354
transcription: AudioTranscriptionParam

0 commit comments

Comments
 (0)