-
Notifications
You must be signed in to change notification settings - Fork 3
/
TTSEngine.h
38 lines (35 loc) · 889 Bytes
/
TTSEngine.h
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
#include <stdio.h>
#include <windows.h>
#include <string>
#include "TextStruct.h"
#include "TTSSoundSynthesis.h"
using namespace std;
class TTSEngine
{
public:
TTSEngine();
~TTSEngine();
void ReadText(string text);
void ReadTextAndWait(string text);
void ReadWord(string word);
void ReadCharacter(char character);
void ReadNumber(string number);
void StopEngine();
void ResumeEngine();
void PauseEngine();
void CreateOutput();
void SetPuncRead(bool);
bool GetPuncRead(){ return parser->GetPuncRead(); }
friend void WINAPI Produce(LPVOID lpParam);
friend void WINAPI Consume(LPVOID lpParam);
private:
string globalTextPtr; /* used to hold a reference to a given text to read it using threads */
HANDLE threads[THREAD_COUNT];
Parser* parser;
TTSSoundSynthesis* synthesizer;
TTSQueue *queue;
TTSTrie *trie;
HANDLE mutex;
HANDLE stopMutex;
void RestartEngine();
};