docstr: Encode the given (batch of) texts into numerical tensors
  
  Args:
      text (str or list of str): The input texts.
  
  Returns:
      (Tensor, Tensor):
      Tensor:
          The encoded texts. Shape: `(batch, max length)`
      Tensor:
          The valid length of each sample in the batch. Shape: `(batch, )`.
docstr_tok: ["Encode","the","given","(","batch","of",")","texts","into","numerical","tensors","Args",":","text","(","str","or","list","of","str",")",":","The","input","texts",".","Returns",":","(","Tensor",",","Tensor",")",":","Tensor",":","The","encoded","texts",".","Shape",":","`","(","batch",",","max","length",")","`","Tensor",":","The","valid","length","of","each","sample","in","the","batch",".","Shape",":","`","(","batch",",",")","`","."]
code: def __call__(
      self, texts: Union[str, List[str]]
  ) -> Tuple[Tensor, Tensor]:
      """Encode the given (batch of) texts into numerical tensors
  
      Args:
          text (str or list of str): The input texts.
  
      Returns:
          (Tensor, Tensor):
          Tensor:
              The encoded texts. Shape: `(batch, max length)`
          Tensor:
              The valid length of each sample in the batch. Shape: `(batch, )`.
      """
  
file_path: audio/src/torchaudio/pipelines/_tts/interface.py
imports: from abc import ABC, abstractmethod
  from typing import List, Optional, Tuple, Union
  from torch import Tensor
  from torchaudio.models import Tacotron2
label_desc: Use image node_id 2 for calling the _TextProcessor obj's underlying member method code with example usage: obj.__call__(texts) without return types