Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
TensorSpeech
GitHub Repository: TensorSpeech/TensorFlowTTS
Path: blob/master/examples/cpptflite/src/TTSBackend.h
1559 views
1
#ifndef TTSBACKEND_H
2
#define TTSBACKEND_H
3
4
#include <iostream>
5
#include <vector>
6
#include "MelGenerateTF.h"
7
#include "VocoderTF.h"
8
9
class TTSBackend
10
{
11
public:
12
TTSBackend(const char* melgenfile, const char* vocoderfile):
13
MelGen(melgenfile), Vocoder(vocoderfile)
14
{
15
std::cout << "TTSBackend Init" << std::endl;
16
std::cout << melgenfile << std::endl;
17
std::cout << vocoderfile << std::endl;
18
};
19
20
void inference(std::vector<int32_t> phonesIds);
21
22
MelGenData getMel() const {return _mel;}
23
std::vector<float> getAudio() const {return _audio;}
24
25
private:
26
MelGenerateTF MelGen;
27
VocoderTF Vocoder;
28
29
MelGenData _mel;
30
std::vector<float> _audio;
31
};
32
33
#endif // TTSBACKEND_H
34