-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
36 lines (28 loc) · 1.1 KB
/
main.cpp
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
#include <iostream>
#include "instrument_detector.hpp"
int main() {
std::cout << "Thanks for trying InstinctAI" << std::endl;
InstrumentDetector detector;
std::string mode;
std::cout << "Choose mode: (1) Training (2) Detection: ";
std::cin >> mode;
if (mode == "1") {
std::string instrumentDbPath;
std::cout << "Enter the path to the instrument database: ";
std::cin >> instrumentDbPath;
detector.train(instrumentDbPath);
std::cout << "Training completed successfully!" << std::endl;
} else if (mode == "2") {
std::string modelPath;
std::cout << "Enter the path to the saved model: ";
std::cin >> modelPath;
std::string audioFilePath;
std::cout << "Enter the path to the audio file: ";
std::cin >> audioFilePath;
detector.guess(modelPath, audioFilePath);
std::cout << "Detection completed successfully! Check the results.txt file." << std::endl;
} else {
std::cout << "Invalid mode selected. Exiting..." << std::endl;
}
return 0;
}