在代码中,想要查看一个函数或变量的定义位置时,可以将鼠标放在想要查看的对象上 ,按ctrl+鼠标左键
,即可跳转到定义位置
。
例如:想要查看extract_all_wav_feature()
的定义位置,直接将光标放在该位置:
ctrl+鼠标左键
即可跳转到定义位置:
def extract_all_wav_feature(wavdir, distfile, opensmiledir):
'''Extract 6373-dimension static features into one dist file.
Args:
wavdir: Path to audios in WAV format.
distfile: Path of distfile.
opensmiledir: Path to opensimle project root.
Returns:
Distfile containing 6373-dimension static features of all the WAVs.
'''
SMILExtract = os.path.join(opensmiledir,"SMILExtract")
config_file = os.path.join(opensmiledir,"config", "IS13_ComParE.conf")
if os.path.exists(distfile):
os.remove(distfile)
wav = [f for f in os.listdir(wavdir) if f[-4:] == ".wav"]
for w in wav:
wavpath = os.path.join(wavdir,w)
subprocess.check_call([SMILExtract, "-C", config_file, "-I", wavpath, "-O", distfile, "-instname", w])