code: def test_predict_from_text(bot, sentences_expected):
      speeches = []
      from src.tts import get_tts_model, get_speakers
  
      processor, model, vocoder = get_tts_model()
      speaker = get_speakers()[0]
      tts_speed = 1.0
  
      from src.tts import predict_from_text
  
      for audio in predict_from_text(
          bot,
          speaker,
          tts_speed,
          processor=processor,
          model=model,
          vocoder=vocoder,
          return_as_byte=False,
          verbose=True,
      ):
          if audio[1].shape[0] > 0:
              speeches.append(audio)
      assert len(speeches) == len(sentences_expected)
  
file_path: h2ogpt/tests/test_tts.py
imports: import os
  import pytest
  from tests.utils import wrap_test_forked
  from src.tts_sentence_parsing import init_sentence_state
  from tests.test_sentence_parsing import bot_list
label_desc: Use image node_id 4 for calling a global function with example usage: test_predict_from_text(bot, sentences_expected) without return types