code: 
  
  
  import unittest
  
  from transformers import is_torch_available, load_tool
  
  from .test_tools_common import ToolTesterMixin
  
  
  if is_torch_available():
    import torch
  
  
  
  
  
  
  
  class 				__SCREAMING_SNAKE_CASE   (			unittest.TestCase  ,						A__   ):
  
  
        def        __lowerCamelCase			(							self		):
              lowercase			:   Union[str, Any]					   =		load_tool('''speech-to-text'''		)
              self.tool.setup()
  
  
        def        __lowerCamelCase			(							self		):
              lowercase			:   Union[str, Any]					   =		self.tool(torch.ones(3000		)		)
              self.assertEqual(SCREAMING_SNAKE_CASE__							,						''' you'''		)
  
  
  
  
  
  
        def        __lowerCamelCase			(							self		):
              lowercase			:   Tuple					   =		self.tool(audio=torch.ones(3000		)		)
              self.assertEqual(SCREAMING_SNAKE_CASE__							,						''' you'''		)
  
  
style_context: 
  
  
  from ...utils import (
      OptionalDependencyNotAvailable,
      is_torch_available,
      is_transformers_available,
      is_transformers_version,
  )
  
  
  try:
    if not (is_transformers_available() and is_torch_available() and is_transformers_version('''>=''', '''4.27.0''')):
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    from ...utils.dummy_torch_and_transformers_objects import (
        AudioLDMPipeline,
    )
  else:
    from .pipeline_audioldm import AudioLDMPipeline
  
  