-
Notifications
You must be signed in to change notification settings - Fork 36
/
settings.py
47 lines (43 loc) · 1.66 KB
/
settings.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
36
37
38
39
40
41
42
43
44
45
46
47
from config.config import *
from lib.record_data import record_sound
from lib.learn_data import learn_data
from lib.test_data import test_data
from lib.convert_files import convert_files
from lib.combine_models import combine_models
from lib.migrate_data import check_migration
def root_navigation( first):
if( first ):
print( "Welcome to Parrot.PY setup!" )
if( not PYTORCH_AVAILABLE ):
print( "No PyTorch library detected - will use only SKLEARN machinelearning libraries" )
print( "----------------------------" )
print( "Enter one of the buttons below and press enter to start" )
print( " - [R] for recording" )
print( " - [V] for resegmenting audio files with different thresholds" )
print( " and converting files into different formats" )
print( " - [L] for learning the data" )
print( " - [C] for combining multiple models into one model" )
print( " - [A] for analyzing the performance of the models" )
print( " - [X] for exiting setup" )
select_mode()
def select_mode():
setup_mode = input("")
if( setup_mode.lower() == 'r' ):
record_sound()
root_navigation( False )
elif( setup_mode.lower() == 'l' ):
learn_data()
root_navigation( False )
elif( setup_mode.lower() == 'c' ):
combine_models()
root_navigation( False )
elif( setup_mode.lower() == 'a' ):
test_data( True )
root_navigation( False )
elif( setup_mode.lower() == 'v' ):
convert_files( True )
root_navigation( False )
elif( setup_mode.lower() == 'x' ):
print( "Goodbye." )
check_migration()
root_navigation( True )