def METHOD_NAME(cls, task, audio: Union[str, torch.Tensor]):
    input_type = task.data_cfg.hub.get("input_type", "fbank80")
    if input_type == "fbank80_w_utt_cmvn":
        if isinstance(audio, str):
            feat = utt_cmvn.UtteranceCMVN()(get_fbank(audio))
            feat = feat.unsqueeze(0)  # T x D -> 1 x T x D
        else:
            import torchaudio.compliance.kaldi as kaldi
            feat = kaldi.fbank(audio, num_mel_bins=80).numpy()  # 1 x T x D
    elif input_type in {"waveform", "standardized_waveform"}:
        if isinstance(audio, str):
            feat, sr = get_wav(audio)  # C x T
            feat, _ = convert_wav(
                feat, sr, to_sample_rate=16_000, to_mono=True
            )  # C x T -> 1 x T
        else:
            feat = audio.numpy()
    else:
        raise ValueError(f"Unknown value: input_type = {input_type}")
    src_lengths = torch.Tensor([feat.shape[1]]).long()
    src_tokens = torch.from_numpy(feat)  # 1 x T (x D)
    if input_type == "standardized_waveform":
        with torch.no_grad():
            src_tokens = F.layer_norm(src_tokens, src_tokens.shape)
    return {
        "net_input": {
            "src_tokens": src_tokens,
            "src_lengths": src_lengths,
            "prev_output_tokens": None,
        },
        "target_lengths": None,
        "speaker": None,
    }