






'''simple docstring'''


import unittest

from transformers import load_tool
from transformers.utils import is_torch_available


if is_torch_available():
					import torch

from transformers.testing_utils import require_torch

from .test_tools_common import ToolTesterMixin
@require_torch
class    _SCREAMING_SNAKE_CASE							(		unittest.TestCase       ,SCREAMING_SNAKE_CASE	):


			'''simple docstring'''





			def 				A      (   self							:						Optional[Any]			)							->    str:

									'''simple docstring'''







									UpperCamelCase__         = load_tool("""text-to-speech"""			)
									self.tool.setup()






			def 				A      (   self							:						str			)							->    Tuple:

									'''simple docstring'''







									torch.manual_seed(0			)
									UpperCamelCase__         = self.tool("""hey"""			)
									UpperCamelCase__         = result.to_raw()
									self.assertTrue(
									    torch.allclose(
									        resulting_tensor[:3] ,      torch.tensor([-0.0_0_0_5_9_6_6_6_6_8_8_3_2_1_1_5_8_2_9, -0.0_0_0_3_6_5_7_6_4_0_1_9_0_7_9_5_0_6_4, -0.0_0_0_1_3_4_3_9_5_0_2_7_9_9_8_8_3_4_8_5]			) ,      )			)







			def 				A      (   self							:						Union[str, Any]			)							->    str:

									'''simple docstring'''







									torch.manual_seed(0			)
									UpperCamelCase__         = self.tool("""hey"""			)
									UpperCamelCase__         = result.to_raw()
									self.assertTrue(
									    torch.allclose(
									        resulting_tensor[:3] ,      torch.tensor([-0.0_0_0_5_9_6_6_6_6_8_8_3_2_1_1_5_8_2_9, -0.0_0_0_3_6_5_7_6_4_0_1_9_0_7_9_5_0_6_4, -0.0_0_0_1_3_4_3_9_5_0_2_7_9_9_8_8_3_4_8_5]			) ,      )			)








'''simple docstring'''


from typing import TYPE_CHECKING

from ..utils import _LazyModule


lowerCamelCase_				: List[Any]    	=							{
    '''config''': [
        '''EXTERNAL_DATA_FORMAT_SIZE_LIMIT''',
        '''OnnxConfig''',
        '''OnnxConfigWithPast''',
        '''OnnxSeq2SeqConfigWithPast''',
        '''PatchingSpec''',
    ],
    '''convert''': ['''export''', '''validate_model_outputs'''],
    '''features''': ['''FeaturesManager'''],
    '''utils''': ['''ParameterFormat''', '''compute_serialized_parameters_size'''],
}


if TYPE_CHECKING:
					from .config import (
					    EXTERNAL_DATA_FORMAT_SIZE_LIMIT,
					    OnnxConfig,
					    OnnxConfigWithPast,
					    OnnxSeqaSeqConfigWithPast,
					    PatchingSpec,
					)
					from .convert import export, validate_model_outputs
					from .features import FeaturesManager
					from .utils import ParameterFormat, compute_serialized_parameters_size

else:
					import sys

					lowerCamelCase_				: List[Any]    	=							_LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)
