-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
executable file
·54 lines (48 loc) · 1.13 KB
/
main.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
48
49
50
51
52
53
54
from tap import mainTap
from rK import recordKey
from tap import ConvertToImage
from tap import ReadWavFile, ReadWavFile2
from continiousKeyRecord import startDataCollection
from audioToImage import generateImageFromFiles
import os
def main():
#clear screen for windows
os.system("cls")
print "1. Train and Start"
print "2. Record Surface"
print "3. Record Keys"
print "4. Conver to Image"
print "5. Read Wav File"
print "6. Generate PColormesh"
print "7. Generate Spectrogram"
print "8. Generate PColormesh and Spectrogram"
print "9. Continious Key Record"
print "0. Exit"
while True:
ch = input("Enter your option ")
if(ch == 1):
mainTap('A')
elif(ch == 2):
mainTap('B')
elif(ch == 3):
recordKey()
if(ch == 4):
ConvertToImage()
elif(ch==5):
ReadWavFile()
ReadWavFile2()
elif(ch==6):
generateImageFromFiles(True, False)
elif(ch==7):
generateImageFromFiles(False, True)
elif(ch==8):
generateImageFromFiles(True, True)
elif(ch==9):
startDataCollection()
elif(ch == 0):
print "Goodbye!"
break
else:
print "Invalid Input. Please Try Again. "
if __name__ == '__main__':
main()