-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.py
35 lines (27 loc) · 976 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# External Imports
import librosa
import inspect
# Project Level Imports
# None
"""
Storage of various global configurations
Access to these values can be used by importing config.py
"""
cfg = {"datasource_path": "datasources",
"dataset_save_loc": "datasets",
"results_save_loc": "results",
"transcription_method": "google",
"audio_res_type": "kaiser_best",
"dev_audio_limit": 0,
"audio_feature_funcs": dict(inspect.getmembers(librosa.feature, inspect.isfunction))
}
runtimeCfg = {}
def showAudioExtractionFunctions():
print("HELP - Possible Functions are:", cfg["audio_feature_funcs"].keys())
def showAudioFunctionArgs(functionName):
print("Attempting to retrieve arguments for function: ", functionName)
try:
print(inspect.signature(cfg["audio_feature_funcs"][functionName]))
except KeyError:
print("ERROR - No Function found with name:", functionName)
showAudioExtractionFunctions()