





def     _lowerCAmelCase		(  _lowerCAmelCase     ):
   '''simple docstring'''


   A_     :				Optional[Any]			      =	abs(_lowerCAmelCase     )
   A_     :				List[Any]			      =	0
   while n > 0:
      res += n % 1_0
      n //= 1_0
   return res



def     _lowerCAmelCase		(  _lowerCAmelCase     ):
   '''simple docstring'''


   A_     :				int			      =	abs(_lowerCAmelCase     )
   return n if n < 1_0 else n % 1_0 + sum_of_digits(n // 1_0     )



def     _lowerCAmelCase		(  _lowerCAmelCase     ):
   '''simple docstring'''


   return sum(int(_lowerCAmelCase     ) for c in str(abs(_lowerCAmelCase     )     )     )



def     _lowerCAmelCase		(  ):
   '''simple docstring'''


   from collections.abc import Callable
   from timeit import timeit

   def benchmark_a_function(_lowerCAmelCase  ,_lowerCAmelCase     ) -> None:
      A_     :				Optional[int]			      =	f"""{func.__name__}({value})"""
      A_     :				Any			      =	timeit(f"""__main__.{call}"""  ,setup="""import __main__"""     )
      print(f"""{call:56} = {func(_lowerCAmelCase     )} -- {timing:.4f} seconds"""     )

   for value in (2_6_2_1_4_4, 1_1_2_5_8_9_9_9_0_6_8_4_2_6_2_4, 1_2_6_7_6_5_0_6_0_0_2_2_8_2_2_9_4_0_1_4_9_6_7_0_3_2_0_5_3_7_6):
      for func in (sum_of_digits, sum_of_digits_recursion, sum_of_digits_compact):
         benchmark_a_function(_lowerCAmelCase  ,_lowerCAmelCase     )
      print()


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      benchmark()













from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_torch_available,
)


_lowerCAmelCase 				=     {
    """configuration_speecht5""": [
        """SPEECHT5_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """SPEECHT5_PRETRAINED_HIFIGAN_CONFIG_ARCHIVE_MAP""",
        """SpeechT5Config""",
        """SpeechT5HifiGanConfig""",
    ],
    """feature_extraction_speecht5""": ["""SpeechT5FeatureExtractor"""],
    """processing_speecht5""": ["""SpeechT5Processor"""],
}

try:
      if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      _lowerCAmelCase 				=     ["""SpeechT5Tokenizer"""]

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      _lowerCAmelCase 				=     [
          """SPEECHT5_PRETRAINED_MODEL_ARCHIVE_LIST""",
          """SpeechT5ForSpeechToText""",
          """SpeechT5ForSpeechToSpeech""",
          """SpeechT5ForTextToSpeech""",
          """SpeechT5Model""",
          """SpeechT5PreTrainedModel""",
          """SpeechT5HifiGan""",
      ]

if TYPE_CHECKING:
      from .configuration_speechta import (
          SPEECHT5_PRETRAINED_CONFIG_ARCHIVE_MAP,
          SPEECHT5_PRETRAINED_HIFIGAN_CONFIG_ARCHIVE_MAP,
          SpeechTaConfig,
          SpeechTaHifiGanConfig,
      )
      from .feature_extraction_speechta import SpeechTaFeatureExtractor
      from .processing_speechta import SpeechTaProcessor

      try:
            if not is_sentencepiece_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_speechta import SpeechTaTokenizer

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_speechta import (
                SPEECHT5_PRETRAINED_MODEL_ARCHIVE_LIST,
                SpeechTaForSpeechToSpeech,
                SpeechTaForSpeechToText,
                SpeechTaForTextToSpeech,
                SpeechTaHifiGan,
                SpeechTaModel,
                SpeechTaPreTrainedModel,
            )

else:
      import sys

      _lowerCAmelCase 				=     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)






