Fixing ruff format.
This commit is contained in:
@@ -221,12 +221,12 @@ class BaseInputTransport(FrameProcessor):
|
|||||||
await self.push_frame(UserEndOfTurnFrame())
|
await self.push_frame(UserEndOfTurnFrame())
|
||||||
await self._handle_user_interruption(UserStoppedSpeakingFrame())
|
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
|
is_speech = vad_state == VADState.SPEAKING or vad_state == VADState.STARTING
|
||||||
# If silence exceeds threshold, we are going to receive EndOfTurnState.COMPLETE
|
# If silence exceeds threshold, we are going to receive EndOfTurnState.COMPLETE
|
||||||
end_of_turn_state = self._params.end_of_turn_analyzer.append_audio(
|
end_of_turn_state = self._params.end_of_turn_analyzer.append_audio(frame.audio, is_speech)
|
||||||
frame.audio, is_speech
|
|
||||||
)
|
|
||||||
if end_of_turn_state == EndOfTurnState.COMPLETE:
|
if end_of_turn_state == EndOfTurnState.COMPLETE:
|
||||||
await self._handle_end_of_turn_complete(end_of_turn_state)
|
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
|
# Otherwise we are going to trigger to check if the turn is completed based on the VAD
|
||||||
|
|||||||
Reference in New Issue
Block a user