class_docstr: Transcribes audio files using OpenAI's Whisper's model on your local machine.
  
  For the supported audio formats, languages, and other parameters, see the
  [Whisper API documentation](https://platform.openai.com/docs/guides/speech-to-text) and the official Whisper
  [github repo](https://github.com/openai/whisper).
class_docstr_tok: ["Transcribes","audio","files","using","OpenAI","'s","Whisper","'s","model","on","your","local","machine",".","For","the","supported","audio","formats",",","languages",",","and","other","parameters",",","see","the","[","Whisper","API","documentation","]","(","https",":","\/\/platform.openai.com\/docs\/guides\/speech-to-text",")","and","the","official","Whisper","[","github","repo","]","(","https",":","\/\/github.com\/openai\/whisper",")","."]
docstr: Transcribe the given audio files. Returns the output of the model, a dictionary, for each input file.
  
  For the supported audio formats, languages, and other parameters, see the
  [Whisper API documentation](https://platform.openai.com/docs/guides/speech-to-text) and the official Whisper
  [github repo](https://github.com/openai/whisper).
  
  :param audio_files: A list of paths or binary streams to transcribe.
  :returns: A dictionary of  file_path -> transcription.
docstr_tok: ["Transcribe","the","given","audio","files",".","Returns","the","output","of","the","model",",","a","dictionary",",","for","each","input","file",".","For","the","supported","audio","formats",",","languages",",","and","other","parameters",",","see","the","[","Whisper","API","documentation","]","(","https",":","\/\/platform.openai.com\/docs\/guides\/speech-to-text",")","and","the","official","Whisper","[","github","repo","]","(","https",":","\/\/github.com\/openai\/whisper",")",".",":","param","audio_files",":","A","list","of","paths","or","binary","streams","to","transcribe",".",":","returns",":","A","dictionary","of","file_path","-",">","transcription","."]
code: def _raw_transcribe(
      self, sources: List[Union[str, Path, ByteStream]], **kwargs
  ) -> Dict[Path, Any]:
      """
      Transcribe the given audio files. Returns the output of the model, a dictionary, for each input file.
  
      For the supported audio formats, languages, and other parameters, see the
      [Whisper API documentation](https://platform.openai.com/docs/guides/speech-to-text) and the official Whisper
      [github repo](https://github.com/openai/whisper).
  
      :param audio_files: A list of paths or binary streams to transcribe.
      :returns: A dictionary of  file_path -> transcription.
      """
      if self._model is None:
          raise ComponentError(
              "Model is not loaded, please run 'warm_up()' before calling 'run()'"
          )
  
      return_segments = kwargs.pop("return_segments", False)
      transcriptions: Dict[Path, Any] = {}
      for source in sources:
          if not isinstance(source, ByteStream):
              path = Path(source)
              source = ByteStream.from_file_path(path)
              source.meta["file_path"] = path
          else:
              # If we received a ByteStream instance that doesn't have the "file_path" metadata set,
              # we dump the bytes into a temporary file.
              path = source.meta.get("file_path")
              if path is None:
                  fp = tempfile.NamedTemporaryFile(delete=False)
                  path = Path(fp.name)
                  source.to_file(path)
                  source.meta["file_path"] = path
  
          transcription = self._model.transcribe(str(path), **kwargs)
          if not return_segments:
              transcription.pop("segments", None)
          transcriptions[path] = transcription
  
      return transcriptions
  
file_path: haystack/haystack/components/audio/whisper_local.py
imports: from typing import List, Optional, Dict, Any, Union, Literal, get_args
  import logging
  import tempfile
  from pathlib import Path
  from haystack import component, Document, default_to_dict, ComponentError
  from haystack.dataclasses import ByteStream
  from haystack.lazy_imports import LazyImport
label_desc: Use image node_id 6 for calling the LocalWhisperTranscriber obj's underlying member method code with example usage: obj._raw_transcribe(sources) and returns: transcriptions