

'''simple docstring'''
from __future__ import annotations




def 	UpperCamelCase   (       lowercase_						:    list[int | str]	)		->	None:




  '''simple docstring'''



  create_state_space_tree(lowercase_     ,					[]     ,					0     ,					[0 for i in range(len(lowercase_	)	)]	)




def 	UpperCamelCase   (       lowercase_						:    list[int | str]     ,					lowercase_						:    list[int | str]     ,					lowercase_						:    int     ,					lowercase_						:    list[int]     ,					)		->	None:




  '''simple docstring'''



  if index == len(lowercase_	):
    print(lowercase_	)
    return

  for i in range(len(lowercase_	)	):
    if not index_used[i]:
      current_sequence.append(sequence[i]	)
      lowercase									=True
      create_state_space_tree(lowercase_     ,					lowercase_     ,					index + 1     ,					lowercase_	)
      current_sequence.pop()
      lowercase									=False
_UpperCAmelCase  :		list[int | str]  =		[3, 1, 2, 4]
generate_all_permutations(sequence)

_UpperCAmelCase  :		list[int | str]  =		["A", "B", "C"]




generate_all_permutations(sequence_a)








"""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       __A		(   SCREAMING_SNAKE_CASE_			):
					UpperCAmelCase__								=				"openai/whisper-base"
					UpperCAmelCase__								=				(
					    "This is a tool that transcribes an audio into text. It takes an input named `audio` and returns the "
					    "transcribed text."
					)
					UpperCAmelCase__								=				"transcriber"
					UpperCAmelCase__								=				WhisperProcessor
					UpperCAmelCase__								=				WhisperForConditionalGeneration

					UpperCAmelCase__								=				["audio"]
					UpperCAmelCase__								=				["text"]

					def   lowerCamelCase__   (			self  :      Dict     ,		__snake_case  :      List[str]					)			->							Dict:
											return self.pre_processor(__snake_case     ,		return_tensors="""pt"""					).input_features

					def   lowerCamelCase__   (			self  :      int     ,		__snake_case  :      Union[str, Any]					)			->							List[str]:
											return self.model.generate(inputs=__snake_case					)






					def   lowerCamelCase__   (			self  :      Union[str, Any]     ,		__snake_case  :      List[Any]					)			->							Any:
											return self.pre_processor.batch_decode(__snake_case     ,		skip_special_tokens=__snake_case					)[0]



