
from typing import TYPE_CHECKING

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


__lowerCamelCase				=			{
    """configuration_speech_to_text""": ["""SPEECH_TO_TEXT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """Speech2TextConfig"""],
    """processing_speech_to_text""": ["""Speech2TextProcessor"""],
}

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

try:
   if not is_speech_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __lowerCamelCase				=			["""Speech2TextFeatureExtractor"""]

try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __lowerCamelCase				=			[
       """TF_SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """TFSpeech2TextForConditionalGeneration""",
       """TFSpeech2TextModel""",
       """TFSpeech2TextPreTrainedModel""",
   ]

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   __lowerCamelCase				=			[
       """SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST""",
       """Speech2TextForConditionalGeneration""",
       """Speech2TextModel""",
       """Speech2TextPreTrainedModel""",
   ]


if TYPE_CHECKING:
   from .configuration_speech_to_text import SPEECH_TO_TEXT_PRETRAINED_CONFIG_ARCHIVE_MAP, SpeechaTextConfig
   from .processing_speech_to_text import SpeechaTextProcessor

   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_speech_to_text import SpeechaTextTokenizer

   try:
      if not is_speech_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .feature_extraction_speech_to_text import SpeechaTextFeatureExtractor

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_speech_to_text import (
          TF_SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFSpeechaTextForConditionalGeneration,
          TFSpeechaTextModel,
          TFSpeechaTextPreTrainedModel,
      )

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_speech_to_text import (
          SPEECH_TO_TEXT_PRETRAINED_MODEL_ARCHIVE_LIST,
          SpeechaTextForConditionalGeneration,
          SpeechaTextModel,
          SpeechaTextPreTrainedModel,
      )

else:
   import sys

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







def      UpperCamelCase   (       __lowerCamelCase	:					str = "The quick brown fox jumps over the lazy dog"							,   ):
       snake_case			:  Dict     							= set()

       # Replace all the whitespace in our sentence
       snake_case			:  List[Any]     							= input_str.replace(" "							,   ""       )
       for alpha in input_str:
              if "a" <= alpha.lower() <= "z":
                     frequency.add(alpha.lower()       )
       return len(__lowerCamelCase       ) == 26


def      UpperCamelCase   (       __lowerCamelCase	:					str = "The quick brown fox jumps over the lazy dog"							,   ):
       snake_case			:  Optional[int]     							= [False] * 26
       for char in input_str:
              if char.islower():
                     snake_case			:  Dict     							= True
              elif char.isupper():
                     snake_case			:  Optional[Any]     							= True
       return all(__lowerCamelCase       )


def      UpperCamelCase   (       __lowerCamelCase	:					str = "The quick brown fox jumps over the lazy dog"							,   ):
       return len({char for char in input_str.lower() if char.isalpha()}       ) == 26


def      UpperCamelCase   (       ):
       from timeit import timeit

       snake_case			:  Tuple     							= "from __main__ import is_pangram, is_pangram_faster, is_pangram_fastest"
       print(timeit("is_pangram()"							,   setup=__lowerCamelCase       )       )
       print(timeit("is_pangram_faster()"							,   setup=__lowerCamelCase       )       )
       print(timeit("is_pangram_fastest()"							,   setup=__lowerCamelCase       )       )
       # 5.348480500048026, 2.6477354579837993, 1.8470395830227062
       # 5.036091582966037, 2.644472333951853,  1.8869528750656173


if __name__ == "__main__":
   import doctest

   doctest.testmod()
   benchmark()





