-
Notifications
You must be signed in to change notification settings - Fork 20
/
tacotron2.h
31 lines (20 loc) · 944 Bytes
/
tacotron2.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
#ifndef TACOTRON2_H
#define TACOTRON2_H
#include "melgen.h"
class Tacotron2 : public MelGen
{
private:
TFTensor<float> DoInferenceTFTTS(const std::vector<int32_t>& InputIDs,int32_t SpeakerID = 0, int32_t EmotionID = -1);
TFTensor<float> DoInferenceCoqui(const std::vector<int32_t>& InputIDs);
public:
Tacotron2();
TFTensor<float> Attention;
/*
Do inference on a Tacotron2 model.
-> InputIDs: Input IDs of tokens for inference
-> SpeakerID: ID of the speaker in the model to do inference on. If single speaker, always leave at 0. If multispeaker, refer to your model.
<- Returns: TFTensor<float> with shape {1,<len of mel in frames>,80} containing contents of mel spectrogram.
*/
TFTensor<float> DoInference(const std::vector<int32_t>& InputIDs,const std::vector<float>& ArgsFloat,const std::vector<int32_t> ArgsInt, int32_t SpeakerID = 0, int32_t EmotionID = -1);
};
#endif // TACOTRON2_H