There was an error while loading. Please reload this page.
1 parent 53ec9d5 commit 00ec712Copy full SHA for 00ec712
src/agents/voice/models/openai_stt.py
@@ -122,7 +122,8 @@ def _end_turn(self, _transcript: str) -> None:
122
return
123
124
if self._tracing_span:
125
- if self._trace_include_sensitive_audio_data:
+ # Only encode audio if tracing is enabled AND buffer is not empty
126
+ if self._trace_include_sensitive_audio_data and self._turn_audio_buffer:
127
self._tracing_span.span_data.input = _audio_to_base64(self._turn_audio_buffer)
128
129
self._tracing_span.span_data.input_format = "pcm"
0 commit comments