class_docstr: Constructs a Wav2Vec2 processor which wraps a Wav2Vec2 feature extractor, a Wav2Vec2 CTC tokenizer and a decoder
  with language model support into a single processor for language model boosted speech recognition decoding.
  
  Args:
      feature_extractor ([`Wav2Vec2FeatureExtractor`]):
          An instance of [`Wav2Vec2FeatureExtractor`]. The feature extractor is a required input.
      tokenizer ([`Wav2Vec2CTCTokenizer`]):
          An instance of [`Wav2Vec2CTCTokenizer`]. The tokenizer is a required input.
      decoder (`pyctcdecode.BeamSearchDecoderCTC`):
          An instance of [`pyctcdecode.BeamSearchDecoderCTC`]. The decoder is a required input.
class_docstr_tok: ["Constructs","a","Wav2Vec2","processor","which","wraps","a","Wav2Vec2","feature","extractor",",","a","Wav2Vec2","CTC","tokenizer","and","a","decoder","with","language","model","support","into","a","single","processor","for","language","model","boosted","speech","recognition","decoding",".","Args",":","feature_extractor","(","[","`","Wav2Vec2FeatureExtractor","`","]",")",":","An","instance","of","[","`","Wav2Vec2FeatureExtractor","`","]",".","The","feature","extractor","is","a","required","input",".","tokenizer","(","[","`","Wav2Vec2CTCTokenizer","`","]",")",":","An","instance","of","[","`","Wav2Vec2CTCTokenizer","`","]",".","The","tokenizer","is","a","required","input",".","decoder","(","`","pyctcdecode.BeamSearchDecoderCTC","`",")",":","An","instance","of","[","`","pyctcdecode.BeamSearchDecoderCTC","`","]",".","The","decoder","is","a","required","input","."]
code: def __init__(
      self,
      feature_extractor: "FeatureExtractionMixin",
      tokenizer: "PreTrainedTokenizerBase",
      decoder: "BeamSearchDecoderCTC",
  ):
      from pyctcdecode import BeamSearchDecoderCTC
  
      super().__init__(feature_extractor, tokenizer)
      if not isinstance(decoder, BeamSearchDecoderCTC):
          raise ValueError(
              f"`decoder` has to be of type {BeamSearchDecoderCTC.__class__}, but is {type(decoder)}"
          )
  
      # make sure that decoder's alphabet and tokenizer's vocab match in content
      missing_decoder_tokens = self.get_missing_alphabet_tokens(
          decoder, tokenizer
      )
      if len(missing_decoder_tokens) > 0:
          raise ValueError(
              f"The tokens {missing_decoder_tokens} are defined in the tokenizer's "
              "vocabulary, but not in the decoder's alphabet. "
              f"Make sure to include {missing_decoder_tokens} in the decoder's alphabet."
          )
  
      self.decoder = decoder
      self.current_processor = self.feature_extractor
      self._in_target_context_manager = False
  
imports: import os
  import warnings
  from contextlib import contextmanager, nullcontext
  from dataclasses import dataclass
  from multiprocessing import Pool, get_context, get_start_method
  from typing import TYPE_CHECKING, Dict, Iterable, List, Optional, Union
  import numpy
  from ...processing_utils import ProcessorMixin
  from ...utils import ModelOutput, logging, requires_backends
label_desc: Use image node_id 1 to create a new Wav2Vec2ProcessorWithLM object from inherited base classes: ProcessorMixin with example: obj = Wav2Vec2ProcessorWithLM(feature_extractor, tokenizer, decoder)