-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (26 loc) · 814 Bytes
/
Copy pathmain.cpp
File metadata and controls
30 lines (26 loc) · 814 Bytes
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
#include <iostream>
#include <string>
// Main include header
#include "ttspeak.h"
int main(int argc, char** argv)
{
std::string saved;
// Class constructor called with object speechOut
ttspeak speechOut;
// Loads the ComSpeak function with max array size of 100
// and gender enum of type FEMALE
speechOut.loadComSpeak(100, FEMALE);
// String to speech synthesis
speechOut.comSpeak("Hello World.");
// Class constructor called with object speechIn
ttspeak speechIn;
// Loads Voice Input with default paramaters
speechIn.loadVoiceInput();
// Waits for full phrase input and will alter saved string to
// that input phrase.
speechIn.voiceInput(saved);
// Input comparison example.
if (saved == "Hello world")
std::cout << "Successful Comparison\n";
return 0;
}