async def _request_generator(self):
        """Generates requests for the streaming recognize method."""
        recognizer_path = f"projects/{self._project_id}/locations/{self._location}/recognizers/_"
        logger.trace(f"Using recognizer path: {recognizer_path}")

        try:
            # Send initial config
            yield cloud_speech.StreamingRecognizeRequest(
                recognizer=recognizer_path,
                streaming_config=self._config,
            )

            while True:
                try:
                    audio_data = await self._request_queue.get()
                    if audio_data is None:  # Sentinel value to stop
                        break

                    # Check streaming limit
                    if (int(time.time() * 1000) - self._stream_start_time) > self.STREAMING_LIMIT:
                        logger.debug("Streaming limit reached, initiating graceful reconnection")
                        # Instead of immediate reconnection, we'll break and let the stream close naturally
                        self._last_audio_input = self._audio_input
                        self._audio_input = []
                        self._restart_counter += 1
                        # Put the current audio chunk back in the queue
                        await self._request_queue.put(audio_data)
                        break

                    self._audio_input.append(audio_data)
                    yield cloud_speech.StreamingRecognizeRequest(audio=audio_data)

                except asyncio.CancelledError:
                    break
                finally:
                    self._request_queue.task_done()

        except Exception as e:
            logger.error(f"Error in request generator: {e}")
            raise
Generates requests for the streaming recognize method.
src/pipecat/services/google/stt.py