class_docstr: Speech2Text class for Transducer models.
  
  Args:
      asr_train_config: ASR model training config path.
      asr_model_file: ASR model path.
      beam_search_config: Beam search config path.
      lm_train_config: Language Model training config path.
      lm_file: Language Model config path.
      token_type: Type of token units.
      bpemodel: BPE model path.
      device: Device to use for inference.
      beam_size: Size of beam during search.
      dtype: Data type.
      lm_weight: Language model weight.
      quantize_asr_model: Whether to apply dynamic quantization to ASR model.
      quantize_modules: List of module names to apply dynamic quantization on.
      quantize_dtype: Dynamic quantization data type.
      nbest: Number of final hypothesis.
      streaming: Whether to perform chunk-by-chunk inference.
      decoding_window: Size of the decoding window (in milliseconds).
      left_context: Number of previous frames the attention module can see
                    in current chunk (used by Conformer and Branchformer block).
docstr: Speech2Text streaming call.
  
  Args:
      speech: Chunk of speech data. (S)
      is_final: Whether speech corresponds to the final chunk of data.
  
  Returns:
      nbest_hypothesis: N-best hypothesis.
docstr_tok: ["Speech2Text","streaming","call",".","Args",":","speech",":","Chunk","of","speech","data",".","(","S",")","is_final",":","Whether","speech","corresponds","to","the","final","chunk","of","data",".","Returns",":","nbest_hypothesis",":","N-best","hypothesis","."]
code: def streaming_decode(
      self,
      speech: Union[torch.Tensor, np.ndarray],
      is_final: bool = False,
  ) -> List[Hypothesis]:
      """Speech2Text streaming call.
  
      Args:
          speech: Chunk of speech data. (S)
          is_final: Whether speech corresponds to the final chunk of data.
  
      Returns:
          nbest_hypothesis: N-best hypothesis.
  
      """
      nbest_hyps = []
  
      if isinstance(speech, np.ndarray):
          speech = torch.tensor(speech)
  
      speech = speech.to(device=self.device)
  
      feats, feats_length = self.audio_processor.compute_features(
          speech.to(getattr(torch, self.dtype)), is_final
      )
  
      enc_out = self.asr_model.encoder.chunk_forward(
          feats,
          feats_length,
          self.num_processed_frames,
          left_context=self.left_context,
      )
      self.num_processed_frames += enc_out.size(1)
  
      nbest_hyps = self.beam_search(enc_out[0], is_final=is_final)
  
      if is_final:
          self.reset_streaming_cache()
  
      return nbest_hyps
  
imports: from __future__ import annotations
  import argparse
  import logging
  import sys
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import numpy
  import torch
  from packaging.version import parse
  from typeguard import check_argument_types, check_return_type
  from espnet2.asr_transducer.beam_search_transducer import BeamSearchTransducer, Hypothesis
  from espnet2.asr_transducer.frontend.online_audio_processor import OnlineAudioProcessor
  from espnet2.asr_transducer.utils import TooShortUttError
  from espnet2.fileio.datadir_writer import DatadirWriter
  from espnet2.tasks.asr_transducer import ASRTransducerTask
  from espnet2.tasks.lm import LMTask
  from espnet2.text.build_tokenizer import build_tokenizer
  from espnet2.text.token_id_converter import TokenIDConverter
  from espnet2.torch_utils.set_all_random_seed import set_all_random_seed
  from espnet2.utils import config_argparse
  from espnet2.utils.types import str2bool, str2triple_str, str_or_none
  from espnet.utils.cli_utils import get_commandline_args
label_desc: Use image node_id 3 for calling the Speech2Text obj's underlying member method code with example usage: obj.streaming_decode(speech, is_final) and returns: nbest_hyps