code: 
  
  import unittest
  
  from transformers import is_torch_available, load_tool
  
  from .test_tools_common import ToolTesterMixin
  
  
  if is_torch_available():
   import torch
  
  
  
  
  
  
  class    __A				(							unittest.TestCase						,						lowerCAmelCase ):
  
  
  
  
  
  
      def 	lowercase__ (	self			:    List[str]    )     ->   str:
          lowerCAmelCase				:			Tuple    			=      load_tool('speech-to-text'    )
          self.tool.setup()
  
  
  
  
  
  
      def 	lowercase__ (	self			:    Union[str, Any]    )     ->   Any:
          lowerCAmelCase				:			List[Any]    			=      self.tool(torch.ones(3000    )    )
          self.assertEqual(UpperCAmelCase_    ,				' you'    )
  
  
  
  
  
  
      def 	lowercase__ (	self			:    str    )     ->   str:
          lowerCAmelCase				:			Tuple    			=      self.tool(audio=torch.ones(3000    )    )
          self.assertEqual(UpperCAmelCase_    ,				' you'    )
  
  
  
  
  
  
style_context: 
  
  from typing import TYPE_CHECKING
  
  from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_tokenizers_available
  
  
  __A   :     Dict      =			{}
  
  try:
   if not is_sentencepiece_available():
    raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
   pass
  else:
   __A   :     List[Any]      =			['''BarthezTokenizer''']
  
  try:
   if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
   pass
  else:
   __A   :     List[str]      =			['''BarthezTokenizerFast''']
  
  
  if TYPE_CHECKING:
   try:
    if not is_sentencepiece_available():
     raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
    pass
   else:
    from .tokenization_barthez import BarthezTokenizer
  
   try:
    if not is_tokenizers_available():
     raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
    pass
   else:
    from .tokenization_barthez_fast import BarthezTokenizerFast
  
  else:
   import sys
  
   __A   :     Tuple      =			_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
  
  
  
  
  
  