
'''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  lowerCAmelCase__   (  unittest.TestCase    ,						lowerCamelCase_     ):






					def 	_snake_case    (   self		):


											"""simple docstring"""





											lowercase_	:     List[Any]													=       load_tool('''text-to-speech'''		)
											self.tool.setup()






					def 	_snake_case    (   self		):


											"""simple docstring"""





											torch.manual_seed(0		)
											lowercase_	:     Dict													=       self.tool('''hey'''		)
											lowercase_	:     List[Any]													=       result.to_raw()
											self.assertTrue(
											    torch.allclose(
											        resulting_tensor[:3]				,							torch.tensor([-0.0_005_966_668_832_115_829, -0.0_003_657_640_190_795_064, -0.00_013_439_502_799_883_485]		)				,							)		)






					def 	_snake_case    (   self		):


											"""simple docstring"""





											torch.manual_seed(0		)
											lowercase_	:     Optional[Any]													=       self.tool('''hey'''		)
											lowercase_	:     Optional[int]													=       result.to_raw()
											self.assertTrue(
											    torch.allclose(
											        resulting_tensor[:3]				,							torch.tensor([-0.0_005_966_668_832_115_829, -0.0_003_657_640_190_795_064, -0.00_013_439_502_799_883_485]		)				,							)		)





'''simple docstring'''







def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: int							):



						"""simple docstring"""





						lowercase_	:     Optional[int]													=       int(__SCREAMING_SNAKE_CASE							)
						if decimal in (0, 1):  # Exit cases for the recursion
												return str(__SCREAMING_SNAKE_CASE							)
						lowercase_						, lowercase_	:     List[str]													=       divmod(__SCREAMING_SNAKE_CASE      ,      2							)
						return binary_recursive(__SCREAMING_SNAKE_CASE							) + str(__SCREAMING_SNAKE_CASE							)
def 					snake_case_		(				__SCREAMING_SNAKE_CASE					: str							):



						"""simple docstring"""





						lowercase_	:     str													=       str(__SCREAMING_SNAKE_CASE							).strip()
						if not number:
												raise ValueError('''No input value was provided'''							)
						lowercase_	:     Optional[int]													=       '''-''' if number.startswith('''-'''							) else ''''''
						lowercase_	:     Union[str, Any]													=       number.lstrip('''-'''							)
						if not number.isnumeric():
												raise ValueError('''Input value is not an integer'''							)
						return F'''{negative}0b{binary_recursive(int(__SCREAMING_SNAKE_CASE							)							)}'''


if __name__ == "__main__":
							from doctest import testmod

							testmod()



