-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathvoxer.h
53 lines (38 loc) · 1.04 KB
/
voxer.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef VOXER_H
#define VOXER_H
#include "Voice.h"
#include <QThread>
#include <QListWidgetItem>
#include <chrono>
#include "rnnoise.h"
const QColor DoneColor = QColor(0,128,0);
const QColor PlayingColor = QColor(168, 40, 94);
const QColor InProcessColor = QColor(0,0,255);
// A Voxer is a thread spawned for the sole purpose of doing inference
class Voxer : public QThread
{
Q_OBJECT
void run() override;
public:
Voice* pAttVoice;
QListWidgetItem* pAttItem;
QString Prompt;
float Speed;
float Energy;
float F0;
int32_t SpeakerID;
uint32_t SampleRate;
int32_t EmotionID;
bool Denoise;
QString EmotionOverride;
// DANGER: If this is set, the item will not emit anything
QString ExportFileName;
float Amplify;
Voxer();
uint32_t CurrentID;
std::vector<float> ForcedAudio;
signals:
void Done(std::vector<float> AudioData,TFTensor<float> Mel,std::chrono::duration<double> infer_span,uint32_t ID);
void AttentionReady(TFTensor<float> Att,uint32_t ID);
};
#endif // VOXER_H