endlessStreamingRecognize method

void endlessStreamingRecognize(
  1. StreamingRecognitionConfig config,
  2. Stream<List<int>> audioStream, {
  3. Duration restartTime = const Duration(minutes: 1),
  4. Duration transitionBufferTime = const Duration(seconds: 2),
})

Sends a StreamingRecognizeRequest to the Google Speech Api. Requires a StreamingRecognitionConfig and an audioStream.

Implementation

void endlessStreamingRecognize(
  StreamingRecognitionConfig config,
  Stream<List<int>> audioStream, {
  Duration restartTime = const Duration(minutes: 1),
  Duration transitionBufferTime = const Duration(seconds: 2),
}) {
  _client = SpeechClient(_channel, options: _options);
  _audioStream = audioStream;
  _config = config;
  _restartTime = restartTime;
  _transitionBufferTime = transitionBufferTime;

  _startStream();
}