Fixing ruff format.

This commit is contained in:
Filipi Fuchter
2025-04-17 16:47:17 -03:00
parent 3ea9cfd251
commit a80dc94e91

View File

@@ -221,12 +221,12 @@ class BaseInputTransport(FrameProcessor):
await self.push_frame(UserEndOfTurnFrame())
await self._handle_user_interruption(UserStoppedSpeakingFrame())
async def _run_turn_analyzer(self, frame: InputAudioRawFrame, vad_state: VADState, previous_vad_state: VADState):
async def _run_turn_analyzer(
self, frame: InputAudioRawFrame, vad_state: VADState, previous_vad_state: VADState
):
is_speech = vad_state == VADState.SPEAKING or vad_state == VADState.STARTING
# If silence exceeds threshold, we are going to receive EndOfTurnState.COMPLETE
end_of_turn_state = self._params.end_of_turn_analyzer.append_audio(
frame.audio, is_speech
)
end_of_turn_state = self._params.end_of_turn_analyzer.append_audio(frame.audio, is_speech)
if end_of_turn_state == EndOfTurnState.COMPLETE:
await self._handle_end_of_turn_complete(end_of_turn_state)
# Otherwise we are going to trigger to check if the turn is completed based on the VAD