def test_voice_activity_detection_vad_error_fallback_silent(self, mock_is_speech):
        """
        Test that the voice activity detection returns False for silent frames.
        """
        pipeline = VoicePipeline(silence_threshold=0.1)
        mock_is_speech.side_effect = ValueError("VAD error")

        frame_np = np.full(480, 0.001, dtype=np.float32)
        frame_bytes = (frame_np * 32768.0).astype(np.int16).tobytes()

        assert pipeline._voice_activity_detection(frame_bytes) is False
        mock_is_speech.assert_called_once_with(frame_bytes, pipeline.input_sample_rate)

        Test that the voice activity detection returns False for silent frames.
        
mlx_audio/sts/tests/test_voice_pipeline.py