from typing import Dict 是什么意思

如:

DEFAULT_AUDIO_PARAMS: Dict = {
    "instrument_list": ("vocals", "accompaniment"),
    "mix_name": "mix",
    "sample_rate": 44100,
    "frame_length": 4096,
    "frame_step": 1024,
    "T": 512,
    "F": 1024,
}

def get_training_dataset(
    audio_params: Dict, audio_adapter: AudioAdapter, audio_path: str
) -> Any:

audio_params: Dict :说明audio_params接受类型为dict

def get_training_dataset(...) -> Any: 说明函数返回值为Any

可以当作是一种注解,明确接收参数。

你可能感兴趣的:(python)