# Copyright 2026 Ant Group. 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 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. """Hugging Face processor for Ming V3 ASR transcription.""" import re import numpy as np import torch from transformers.feature_extraction_utils import BatchFeature from transformers.processing_utils import ProcessingKwargs, ProcessorMixin from .audio_spec import MingAudioSpec # noqa: F401 - include transitive dependency in HF's local module cache from .feature_extraction_ming_v3_asr import MingV3ASRFeatureExtractor _AUDIO_FORMS = ( (""), ("<|audio_start|>", "<|audio_pad|>", "<|audio_end|>"), ) _PLACEHOLDER = "