


'''simple docstring'''







# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from ..models.whisper import WhisperForConditionalGeneration, WhisperProcessor
from .base import PipelineTool


class 			__lowerCamelCase			(	__UpperCamelCase	):
				"""simple docstring"""
				a													=   "openai/whisper-base"
				a													=   (
				    "This is a tool that transcribes an audio into text. It takes an input named `audio` and returns the "
				    "transcribed text."
				)
				a													=   "transcriber"
				a													=   WhisperProcessor
				a													=   WhisperForConditionalGeneration

				a													=   ["audio"]
				a													=   ["text"]


				def        A   (  self      :							Union[str, Any]				,							SCREAMING_SNAKE_CASE      :							Any):
											return self.pre_processor(_lowerCAmelCase				,							return_tensors='pt').input_features


				def        A   (  self      :							Optional[Any]				,							SCREAMING_SNAKE_CASE      :							Union[str, Any]):
											return self.model.generate(inputs=_lowerCAmelCase)


				def        A   (  self      :							Tuple				,							SCREAMING_SNAKE_CASE      :							Any):
											return self.pre_processor.batch_decode(_lowerCAmelCase				,							skip_special_tokens=_lowerCAmelCase)[0]










'''simple docstring'''







def 				lowerCAmelCase__	(    lowerCamelCase					:      int = 10       ):
       if not isinstance(lowerCamelCase  ,lowerCamelCase       ) or n < 0:
              raise ValueError('Invalid input'       )
       _A					:     Optional[Any]     = 10**n
       _A					:     List[str]     = 28433 * (pow(2  ,7830457  ,lowerCamelCase       )) + 1
       return str(number % modulus       )


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

   testmod()
   print(f"""{solution(10) = }""")






