code: def _predict_from_text(
      text,
      speaker,
      processor=None,
      model=None,
      vocoder=None,
      speaker_embedding=None,
      return_as_byte=True,
      sr=16000,
      tts_speed=1.0,
  ):
      if len(text.strip()) == 0:
          return get_no_audio(sr=sr, return_as_byte=return_as_byte)
      if speaker_embedding is None:
          speaker_embedding = get_speaker_embedding(
              speaker, model.device
          )
  
      inputs = processor(text=text, return_tensors="pt")
  
      # limit input length
      input_ids = inputs["input_ids"]
      input_ids = input_ids[..., : model.config.max_text_positions].to(
          model.device
      )
  
      chunk = model.generate_speech(
          input_ids, speaker_embedding, vocoder=vocoder
      )
      chunk = chunk.detach().cpu().numpy().squeeze()
      chunk = (chunk * 32767).astype(np.int16)
      chunk = chunk_speed_change(chunk, sr, tts_speed=tts_speed)
  
      if return_as_byte:
          return chunk.tobytes()
      else:
          return sr, chunk
  
imports: from __future__ import annotations
  import base64
  import io
  import time
  from io import BytesIO
  import numpy
  import scipy
  import wavio
  import soundfile
  import torch
  import librosa
  from src.tts_sentence_parsing import init_sentence_state, get_sentence
  from src.tts_utils import prepare_speech, get_no_audio, chunk_speed_change
label_desc: Use image node_id 11 for calling a global function with example usage: _predict_from_text(text, speaker, processor, model, vocoder, speaker_embedding, return_as_byte, sr, tts_speed) and returns: get_no_audio, chunk, sr,  chunk