code: def gen_t5(
      text,
      processor=None,
      model=None,
      speaker_embedding=None,
      vocoder=None,
  ):
      inputs = processor(text=text, return_tensors="pt").to(
          model.device
      )
      speech = model.generate_speech(
          inputs["input_ids"], speaker_embedding, vocoder=vocoder
      )
      sf.write("speech.wav", speech.cpu().numpy(), samplerate=16000)
  
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 2 for calling a global function with example usage: gen_t5(text, processor, model, speaker_embedding, vocoder) without return types