


"""simple docstring"""


import math
import unittest

from transformers import BioGptConfig, is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...generation.test_utils import GenerationTesterMixin
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor, random_attention_mask
from ...test_pipeline_mixin import PipelineTesterMixin


if is_torch_available():
	import torch

	from transformers import (
	    BioGptForCausalLM,
	    BioGptForSequenceClassification,
	    BioGptForTokenClassification,
	    BioGptModel,
	    BioGptTokenizer,
	)
	from transformers.models.biogpt.modeling_biogpt import BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST
class   _UpperCamelCase  :
							'''simple docstring'''







							def __init__(     self    ,   __a    ,   __a=13    ,   __a=7    ,   __a=True    ,   __a=True    ,   __a=False    ,   __a=True    ,   __a=99    ,   __a=32    ,   __a=5    ,   __a=4    ,   __a=37    ,   __a="gelu"    ,   __a=0.1    ,   __a=0.1    ,   __a=5_12    ,   __a=16    ,   __a=2    ,   __a=0.0_2    ,   __a=3    ,   __a=4    ,   __a=None    ,   ):
										__lowerCAmelCase				    =			parent
										__lowerCAmelCase				    =			batch_size
										__lowerCAmelCase				    =			seq_length
										__lowerCAmelCase				    =			is_training
										__lowerCAmelCase				    =			use_input_mask
										__lowerCAmelCase				    =			use_token_type_ids
										__lowerCAmelCase				    =			use_labels
										__lowerCAmelCase				    =			vocab_size
										__lowerCAmelCase				    =			hidden_size
										__lowerCAmelCase				    =			num_hidden_layers
										__lowerCAmelCase				    =			num_attention_heads
										__lowerCAmelCase				    =			intermediate_size
										__lowerCAmelCase				    =			hidden_act
										__lowerCAmelCase				    =			hidden_dropout_prob
										__lowerCAmelCase				    =			attention_probs_dropout_prob
										__lowerCAmelCase				    =			max_position_embeddings
										__lowerCAmelCase				    =			type_vocab_size
										__lowerCAmelCase				    =			type_sequence_label_size
										__lowerCAmelCase				    =			initializer_range
										__lowerCAmelCase				    =			num_labels
										__lowerCAmelCase				    =			num_choices
										__lowerCAmelCase				    =			scope

							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			ids_tensor([self.batch_size, self.seq_length]    ,   self.vocab_size	)

										__lowerCAmelCase				    =			None
										if self.use_input_mask:
													__lowerCAmelCase				    =			random_attention_mask([self.batch_size, self.seq_length]	)

										__lowerCAmelCase				    =			None
										if self.use_token_type_ids:
													__lowerCAmelCase				    =			ids_tensor([self.batch_size, self.seq_length]    ,   self.type_vocab_size	)

										__lowerCAmelCase				    =			None
										__lowerCAmelCase				    =			None
										__lowerCAmelCase				    =			None
										if self.use_labels:
													__lowerCAmelCase				    =			ids_tensor([self.batch_size]    ,   self.type_sequence_label_size	)
													__lowerCAmelCase				    =			ids_tensor([self.batch_size, self.seq_length]    ,   self.num_labels	)
													__lowerCAmelCase				    =			ids_tensor([self.batch_size]    ,   self.num_choices	)

										__lowerCAmelCase				    =			self.get_config()

										return config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels

							def 			snake_case				(     self	):
										return BioGptConfig(
										    vocab_size=self.vocab_size    ,   hidden_size=self.hidden_size    ,   num_hidden_layers=self.num_hidden_layers    ,   num_attention_heads=self.num_attention_heads    ,   intermediate_size=self.intermediate_size    ,   hidden_act=self.hidden_act    ,   hidden_dropout_prob=self.hidden_dropout_prob    ,   attention_probs_dropout_prob=self.attention_probs_dropout_prob    ,   max_position_embeddings=self.max_position_embeddings    ,   type_vocab_size=self.type_vocab_size    ,   is_decoder=__lowerCamelCase    ,   initializer_range=self.initializer_range    ,   )

							def 			snake_case				(     self    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a	):
										__lowerCAmelCase				    =			BioGptModel(config=__lowerCamelCase	)
										model.to(__lowerCamelCase	)
										model.eval()
										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   attention_mask=__lowerCamelCase	)
										__lowerCAmelCase				    =			model(__lowerCamelCase	)
										self.parent.assertEqual(result.last_hidden_state.shape    ,   (self.batch_size, self.seq_length, self.hidden_size)	)

							def 			snake_case				(     self    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   ):
										__lowerCAmelCase				    =			BioGptForCausalLM(config=__lowerCamelCase	)
										model.to(__lowerCamelCase	)
										model.eval()
										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   attention_mask=__lowerCamelCase    ,   token_type_ids=__lowerCamelCase    ,   labels=__lowerCamelCase	)
										self.parent.assertEqual(result.logits.shape    ,   (self.batch_size, self.seq_length, self.vocab_size)	)

							def 			snake_case				(     self    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   *__a	):
										__lowerCAmelCase				    =			BioGptModel(config=__lowerCamelCase	)
										model.to(__lowerCamelCase	)
										model.eval()

										# create attention mask
										__lowerCAmelCase				    =			torch.ones(input_ids.shape    ,   dtype=torch.long    ,   device=__lowerCamelCase	)
										__lowerCAmelCase				    =			self.seq_length // 2
										__lowerCAmelCase				    =			0

										# first forward pass
										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   attention_mask=__lowerCamelCase	).to_tuple()

										# create hypothetical next token and extent to next_input_ids
										__lowerCAmelCase				    =			ids_tensor((self.batch_size, 1)    ,   config.vocab_size	)

										# change a random masked slice from input_ids
										__lowerCAmelCase				    =			ids_tensor((1,)    ,   __lowerCamelCase	).item() + 1
										__lowerCAmelCase				    =			ids_tensor((self.batch_size, 1)    ,   config.vocab_size	).squeeze(-1	)
										__lowerCAmelCase				    =			random_other_next_tokens

										# append to next input_ids and attn_mask
										__lowerCAmelCase				    =			torch.cat([input_ids, next_tokens]    ,   dim=-1	)
										__lowerCAmelCase				    =			torch.cat(
										    [attn_mask, torch.ones((attn_mask.shape[0], 1)    ,   dtype=torch.long    ,   device=__lowerCamelCase	)]    ,   dim=1    ,   )

										# get two different outputs
										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   attention_mask=__lowerCamelCase	)["last_hidden_state"]
										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   past_key_values=__lowerCamelCase    ,   attention_mask=__lowerCamelCase	)["last_hidden_state"]

										# select random slice
										__lowerCAmelCase				    =			ids_tensor((1,)    ,   output_from_past.shape[-1]	).item()
										__lowerCAmelCase				    =			output_from_no_past[:, -1, random_slice_idx].detach()
										__lowerCAmelCase				    =			output_from_past[:, 0, random_slice_idx].detach()

										# test that outputs are equal for slice
										self.parent.assertTrue(torch.allclose(__lowerCamelCase    ,   __lowerCamelCase    ,   atol=1e-3	)	)

							def 			snake_case				(     self    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   *__a	):
										__lowerCAmelCase				    =			BioGptModel(config=__lowerCamelCase	).to(__lowerCamelCase	).eval()

										__lowerCAmelCase				    =			torch.ones(input_ids.shape    ,   dtype=torch.long    ,   device=__lowerCamelCase	)

										# first forward pass
										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   attention_mask=__lowerCamelCase    ,   use_cache=__lowerCamelCase	)

										__lowerCAmelCase				    =			outputs.to_tuple()

										# create hypothetical multiple next token and extent to next_input_ids
										__lowerCAmelCase				    =			ids_tensor((self.batch_size, 3)    ,   config.vocab_size	)
										__lowerCAmelCase				    =			ids_tensor((self.batch_size, 3)    ,   2	)

										# append to next input_ids and
										__lowerCAmelCase				    =			torch.cat([input_ids, next_tokens]    ,   dim=-1	)
										__lowerCAmelCase				    =			torch.cat([attention_mask, next_attn_mask]    ,   dim=-1	)

										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   attention_mask=__lowerCamelCase	)["last_hidden_state"]
										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   attention_mask=__lowerCamelCase    ,   past_key_values=__lowerCamelCase	)[
										    "last_hidden_state"
										]

										# select random slice
										__lowerCAmelCase				    =			ids_tensor((1,)    ,   output_from_past.shape[-1]	).item()
										__lowerCAmelCase				    =			output_from_no_past[:, -3:, random_slice_idx].detach()
										__lowerCAmelCase				    =			output_from_past[:, :, random_slice_idx].detach()

										self.parent.assertTrue(output_from_past_slice.shape[1] == next_tokens.shape[1]	)

										# test that outputs are equal for slice
										self.parent.assertTrue(torch.allclose(__lowerCamelCase    ,   __lowerCamelCase    ,   atol=1e-3	)	)

							def 			snake_case				(     self    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   *__a    ,   __a=False	):
										__lowerCAmelCase				    =			BioGptForCausalLM(__lowerCamelCase	)
										model.to(__lowerCamelCase	)
										if gradient_checkpointing:
													model.gradient_checkpointing_enable()

										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   labels=__lowerCamelCase	)
										self.parent.assertEqual(result.loss.shape    ,   ()	)
										self.parent.assertEqual(result.logits.shape    ,   (self.batch_size, self.seq_length, self.vocab_size)	)
										result.loss.backward()

							def 			snake_case				(     self    ,   __a    ,   *__a	):
										__lowerCAmelCase				    =			BioGptModel(__lowerCamelCase	)
										__lowerCAmelCase				    =			model.config.initializer_range / math.sqrt(2 * model.config.num_hidden_layers	)
										for key in model.state_dict().keys():
													if "c_proj" in key and "weight" in key:
																self.parent.assertLessEqual(abs(torch.std(model.state_dict()[key]	) - model_std	)    ,   0.0_0_1	)
																self.parent.assertLessEqual(abs(torch.mean(model.state_dict()[key]	) - 0.0	)    ,   0.0_1	)

							def 			snake_case				(     self    ,   __a    ,   __a    ,   __a    ,   __a    ,   __a    ,   *__a	):
										__lowerCAmelCase				    =			self.num_labels
										__lowerCAmelCase				    =			BioGptForTokenClassification(__lowerCamelCase	)
										model.to(__lowerCamelCase	)
										model.eval()
										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   attention_mask=__lowerCamelCase    ,   token_type_ids=__lowerCamelCase	)
										self.parent.assertEqual(result.logits.shape    ,   (self.batch_size, self.seq_length, self.num_labels)	)



							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			self.prepare_config_and_inputs()
										(
										    __lowerCAmelCase			
										)				    =			config_and_inputs
										__lowerCAmelCase				    =			{"input_ids": input_ids, "attention_mask": input_mask}
										return config, inputs_dict
@require_torch
class   _UpperCamelCase  (   lowerCAmelCase__       ,lowerCAmelCase__       ,lowerCAmelCase__       ,unittest.TestCase		):
							'''simple docstring'''







							__UpperCAmelCase						:    int				      =(
							    (BioGptModel, BioGptForCausalLM, BioGptForSequenceClassification, BioGptForTokenClassification)
							    if is_torch_available()
							    else ()
							)
							__UpperCAmelCase						:    Dict				      =(BioGptForCausalLM,) if is_torch_available() else ()
							__UpperCAmelCase						:    Optional[Any]				      =(
							    {
							        """feature-extraction""": BioGptModel,
							        """text-classification""": BioGptForSequenceClassification,
							        """text-generation""": BioGptForCausalLM,
							        """token-classification""": BioGptForTokenClassification,
							        """zero-shot""": BioGptForSequenceClassification,
							    }
							    if is_torch_available()
							    else {}
							)
							__UpperCAmelCase						:    List[str]				      =False

							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			BioGptModelTester(self	)
										__lowerCAmelCase				    =			ConfigTester(self    ,   config_class=__lowerCamelCase    ,   hidden_size=37	)

							def 			snake_case				(     self	):
										self.config_tester.run_common_tests()

							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_model(*__lowerCamelCase	)

							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			self.model_tester.prepare_config_and_inputs()
										for type in ["absolute", "relative_key", "relative_key_query"]:
													__lowerCAmelCase				    =			type
													self.model_tester.create_and_check_model(*__lowerCamelCase	)

							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_biogpt_model_attention_mask_past(*__lowerCamelCase	)

							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_forward_and_backwards(*__lowerCamelCase    ,   gradient_checkpointing=__lowerCamelCase	)

							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_biogpt_model_past_large_inputs(*__lowerCamelCase	)

							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_biogpt_weight_initialization(*__lowerCamelCase	)

							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			self.model_tester.prepare_config_and_inputs()
										self.model_tester.create_and_check_biogpt_for_token_classification(*__lowerCamelCase	)

							@slow
							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			BioGptForCausalLM.from_pretrained("microsoft/biogpt"	)
										model.to(__lowerCamelCase	)
										__lowerCAmelCase				    =			BioGptTokenizer.from_pretrained("microsoft/biogpt"	)

										__lowerCAmelCase				    =			"left"

										# Define PAD Token = EOS Token = 50256
										__lowerCAmelCase				    =			tokenizer.eos_token
										__lowerCAmelCase				    =			model.config.eos_token_id

										# use different length sentences to test batching
										__lowerCAmelCase				    =			[
										    "Hello, my dog is a little",
										    "Today, I",
										]

										__lowerCAmelCase				    =			tokenizer(__lowerCamelCase    ,   return_tensors="pt"    ,   padding=__lowerCamelCase	)
										__lowerCAmelCase				    =			inputs["input_ids"].to(__lowerCamelCase	)

										__lowerCAmelCase				    =			model.generate(
										    input_ids=__lowerCamelCase    ,   attention_mask=inputs["attention_mask"].to(__lowerCamelCase	)    ,   )

										__lowerCAmelCase				    =			tokenizer(sentences[0]    ,   return_tensors="pt"	).input_ids.to(__lowerCamelCase	)
										__lowerCAmelCase				    =			model.generate(input_ids=__lowerCamelCase	)

										__lowerCAmelCase				    =			inputs_non_padded.shape[-1] - inputs["attention_mask"][-1].long().sum().cpu().item()
										__lowerCAmelCase				    =			tokenizer(sentences[1]    ,   return_tensors="pt"	).input_ids.to(__lowerCamelCase	)
										__lowerCAmelCase				    =			model.generate(input_ids=__lowerCamelCase    ,   max_length=model.config.max_length - num_paddings	)

										__lowerCAmelCase				    =			tokenizer.batch_decode(__lowerCamelCase    ,   skip_special_tokens=__lowerCamelCase	)
										__lowerCAmelCase				    =			tokenizer.decode(output_non_padded[0]    ,   skip_special_tokens=__lowerCamelCase	)
										__lowerCAmelCase				    =			tokenizer.decode(output_padded[0]    ,   skip_special_tokens=__lowerCamelCase	)

										__lowerCAmelCase				    =			[
										    "Hello, my dog is a little bit bigger than a little bit.",
										    "Today, I have a good idea of how to use the information",
										]
										self.assertListEqual(__lowerCamelCase    ,   __lowerCamelCase	)
										self.assertListEqual(__lowerCamelCase    ,   [non_padded_sentence, padded_sentence]	)

							@slow
							def 			snake_case				(     self	):
										for model_name in BIOGPT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
													__lowerCAmelCase				    =			BioGptModel.from_pretrained(__lowerCamelCase	)
													self.assertIsNotNone(__lowerCamelCase	)

							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			self.model_tester.prepare_config_and_inputs_for_common()
										__lowerCAmelCase				    =			3
										__lowerCAmelCase				    =			input_dict["input_ids"]
										__lowerCAmelCase				    =			input_ids.ne(1	).to(__lowerCamelCase	)
										__lowerCAmelCase				    =			ids_tensor([self.model_tester.batch_size]    ,   self.model_tester.type_sequence_label_size	)
										__lowerCAmelCase				    =			BioGptForSequenceClassification(__lowerCamelCase	)
										model.to(__lowerCamelCase	)
										model.eval()
										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   attention_mask=__lowerCamelCase    ,   labels=__lowerCamelCase	)
										self.assertEqual(result.logits.shape    ,   (self.model_tester.batch_size, self.model_tester.num_labels)	)



							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			self.model_tester.prepare_config_and_inputs_for_common()
										__lowerCAmelCase				    =			3
										__lowerCAmelCase				    =			"multi_label_classification"
										__lowerCAmelCase				    =			input_dict["input_ids"]
										__lowerCAmelCase				    =			input_ids.ne(1	).to(__lowerCamelCase	)
										__lowerCAmelCase				    =			ids_tensor(
										    [self.model_tester.batch_size, config.num_labels]    ,   self.model_tester.type_sequence_label_size	).to(torch.float	)
										__lowerCAmelCase				    =			BioGptForSequenceClassification(__lowerCamelCase	)
										model.to(__lowerCamelCase	)
										model.eval()
										__lowerCAmelCase				    =			model(__lowerCamelCase    ,   attention_mask=__lowerCamelCase    ,   labels=__lowerCamelCase	)
										self.assertEqual(result.logits.shape    ,   (self.model_tester.batch_size, self.model_tester.num_labels)	)
@require_torch
class   _UpperCamelCase  (   unittest.TestCase		):
							'''simple docstring'''







							@slow
							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			BioGptForCausalLM.from_pretrained("microsoft/biogpt"	)
										__lowerCAmelCase				    =			torch.tensor([[2, 48_05, 9, 6_56, 21]]	)
										__lowerCAmelCase				    =			model(__lowerCamelCase	)[0]

										__lowerCAmelCase				    =			4_23_84

										__lowerCAmelCase				    =			torch.Size((1, 5, vocab_size)	)
										self.assertEqual(output.shape    ,   __lowerCamelCase	)

										__lowerCAmelCase				    =			torch.tensor(
										    [[[-9.5_2_3_6, -9.8_9_1_8, 10.45_57], [-11.04_69, -9.6_4_2_3, 8.1_0_2_2], [-8.8_6_6_4, -7.8_8_2_6, 5.5_3_2_5]]]	)

										self.assertTrue(torch.allclose(output[:, :3, :3]    ,   __lowerCamelCase    ,   atol=1e-4	)	)



							@slow
							def 			snake_case				(     self	):
										__lowerCAmelCase				    =			BioGptTokenizer.from_pretrained("microsoft/biogpt"	)
										__lowerCAmelCase				    =			BioGptForCausalLM.from_pretrained("microsoft/biogpt"	)
										model.to(__lowerCamelCase	)

										torch.manual_seed(0	)
										__lowerCAmelCase				    =			tokenizer("COVID-19 is"    ,   return_tensors="pt"	).to(__lowerCamelCase	)
										__lowerCAmelCase				    =			model.generate(
										    **__lowerCamelCase    ,   min_length=1_00    ,   max_length=10_24    ,   num_beams=5    ,   early_stopping=__lowerCamelCase    ,   )
										__lowerCAmelCase				    =			tokenizer.decode(output_ids[0]    ,   skip_special_tokens=__lowerCamelCase	)

										__lowerCAmelCase				    =			(
										    "COVID-19 is a global pandemic caused by severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2), the"
										    " causative agent of coronavirus disease 2019 (COVID-19), which has spread to more than 200 countries and"
										    " territories, including the United States (US), Canada, Australia, New Zealand, the United Kingdom (UK),"
										    " and the United States of America (USA), as of March 11, 2020, with more than 800,000 confirmed cases and"
										    " more than 800,000 deaths."
										)
										self.assertEqual(__lowerCamelCase    ,   __lowerCamelCase	)








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__)
