code: def test_xtts_streaming():
      """Testing the new inference_stream method"""
      from TTS.tts.configs.xtts_config import XttsConfig
      from TTS.tts.models.xtts import Xtts
  
      speaker_wav = [
          os.path.join(
              get_tests_data_path(),
              "ljspeech",
              "wavs",
              "LJ001-0001.wav",
          )
      ]
      speaker_wav_2 = os.path.join(
          get_tests_data_path(), "ljspeech", "wavs", "LJ001-0002.wav"
      )
      speaker_wav.append(speaker_wav_2)
      model_path = os.path.join(
          get_user_data_dir("tts"),
          "tts_models--multilingual--multi-dataset--xtts_v1.1",
      )
      config = XttsConfig()
      config.load_json(os.path.join(model_path, "config.json"))
      model = Xtts.init_from_config(config)
      model.load_checkpoint(config, checkpoint_dir=model_path)
      model.to(
          torch.device("cuda" if torch.cuda.is_available() else "cpu")
      )
  
      print("Computing speaker latents...")
      (
          gpt_cond_latent,
          speaker_embedding,
      ) = model.get_conditioning_latents(audio_path=speaker_wav)
  
      print("Inference...")
      chunks = model.inference_stream(
          "It took me quite a long time to develop a voice and now that I have it I am not going to be silent.",
          "en",
          gpt_cond_latent,
          speaker_embedding,
      )
      wav_chuncks = []
      for i, chunk in enumerate(chunks):
          if i == 0:
              assert chunk.shape[-1] > 5000
          wav_chuncks.append(chunk)
      assert len(wav_chuncks) > 1
  
file_path: TTS/tests/zoo_tests/test_models.py
imports: import glob
  import os
  import shutil
  import torch
  from tests import get_tests_data_path, get_tests_output_path, run_cli
  from TTS.tts.utils.languages import LanguageManager
  from TTS.tts.utils.speakers import SpeakerManager
  from TTS.utils.generic_utils import get_user_data_dir
  from TTS.utils.manage import ModelManager
label_desc: Use image node_id 3 for calling a global function with example usage: test_xtts_streaming() without return types