code: def test_sentence_to_wave():
      os.environ["CUDA_HOME"] = "/usr/local/cuda-11.7"
      from src.tts_coqui import (
          sentence_to_wave,
          get_xtt,
          get_latent,
          get_role_to_wave_map,
      )
  
      chatbot_role = "Female AI Assistant"
      sentence = "I am an AI assistant.  I can help you with any tasks."
      # supported_languages = ["en", "es", "fr", "de", "it", "pt", "pl", "tr", "ru", "nl", "cs", "ar", "zh-cn", "ja"]
      tts_speed = 1.0
      model, supported_languages = get_xtt()
      latent = get_latent(
          get_role_to_wave_map()[chatbot_role], model=model
      )
      generated_speech = sentence_to_wave(
          sentence,
          supported_languages,
          tts_speed,
          latent=latent,
          model=model,
          return_as_byte=False,
          return_nonbyte_as_file=True,
          return_gradio=False,
      )
      print(generated_speech, flush=True)
  
      # confirm file is valid wave file
      import wave
  
      with wave.open(generated_speech, mode="rb") as f:
          pass
  
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 1 for calling a global function with example usage: test_sentence_to_wave() without return types