




from ..utils import DummyObject, requires_backends




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :int     ,			*__snake_case :Tuple     ,			**__snake_case :Optional[Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :int     ,			*__snake_case :Dict     ,			**__snake_case :List[str]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Optional[Any]     ,			*__snake_case :List[Any]     ,			**__snake_case :Dict			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Dict     ,			*__snake_case :Optional[Any]     ,			**__snake_case :Union[str, Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :List[str]     ,			*__snake_case :str     ,			**__snake_case :Union[str, Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Dict     ,			*__snake_case :List[Any]     ,			**__snake_case :Tuple			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Tuple     ,			*__snake_case :Any     ,			**__snake_case :Optional[int]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Union[str, Any]     ,			*__snake_case :List[str]     ,			**__snake_case :List[str]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :List[str]     ,			*__snake_case :Dict     ,			**__snake_case :List[Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Union[str, Any]     ,			*__snake_case :List[Any]     ,			**__snake_case :Union[str, Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :int     ,			*__snake_case :int     ,			**__snake_case :Union[str, Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Dict     ,			*__snake_case :List[Any]     ,			**__snake_case :Optional[Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Any     ,			*__snake_case :List[str]     ,			**__snake_case :List[Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Dict     ,			*__snake_case :Tuple     ,			**__snake_case :Optional[Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :List[Any]     ,			*__snake_case :Optional[int]     ,			**__snake_case :int			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :List[str]     ,			*__snake_case :int     ,			**__snake_case :str			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Optional[Any]     ,			*__snake_case :Dict     ,			**__snake_case :int			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :str     ,			*__snake_case :Optional[int]     ,			**__snake_case :List[Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Optional[Any]     ,			*__snake_case :Tuple     ,			**__snake_case :List[Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Optional[int]     ,			*__snake_case :List[Any]     ,			**__snake_case :List[str]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :List[Any]     ,			*__snake_case :Any     ,			**__snake_case :List[Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Optional[Any]     ,			*__snake_case :Any     ,			**__snake_case :str			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Dict     ,			*__snake_case :Tuple     ,			**__snake_case :Dict			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :List[Any]     ,			*__snake_case :Optional[Any]     ,			**__snake_case :str			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :List[Any]     ,			*__snake_case :List[str]     ,			**__snake_case :List[str]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Dict     ,			*__snake_case :Dict     ,			**__snake_case :str			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Tuple     ,			*__snake_case :Optional[int]     ,			**__snake_case :str			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :List[Any]     ,			*__snake_case :Dict     ,			**__snake_case :List[Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Dict     ,			*__snake_case :Any     ,			**__snake_case :Dict			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Union[str, Any]     ,			*__snake_case :Dict     ,			**__snake_case :Union[str, Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)




class 		__A   (      metaclass=UpperCamelCase__      ):
						UpperCamelCase      =       ["""sentencepiece"""]

						def __init__(		self :Union[str, Any]     ,			*__snake_case :Union[str, Any]     ,			**__snake_case :List[Any]			):
										'''simple docstring'''

										requires_backends(self     ,			["""sentencepiece"""]			)







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        _a		(unittest.TestCase						,  __magic_name__							):


					'''simple docstring'''






					def     __A     (					self     ):
						A__				:       List[str]	  =						load_tool("""text-to-speech"""     )
						self.tool.setup()






					def     __A     (					self     ):
						# SpeechT5 isn't deterministic
						torch.manual_seed(0     )
						A__				:       Tuple	  =						self.tool("""hey"""     )
						A__				:       Tuple	  =						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     ):
						# SpeechT5 isn't deterministic
						torch.manual_seed(0     )
						A__				:       Any	  =						self.tool("""hey"""     )
						A__				:       Optional[Any]	  =						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]     )       ,			)     )



