Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
TensorSpeech
GitHub Repository: TensorSpeech/TensorFlowTTS
Path: blob/master/examples/cppwin/TensorflowTTSCppInference/TextTokenizer.h
1559 views
1
#pragma once
2
#include <vector>
3
#include <string>
4
#include "VoxCommon.hpp"
5
6
class TextTokenizer
7
{
8
private:
9
std::string AllowedChars;
10
std::string IntToStr(int number);
11
12
std::vector<std::string> ExpandNumbers(const std::vector<std::string>& SpaceTokens);
13
public:
14
TextTokenizer();
15
~TextTokenizer();
16
17
std::vector<std::string> Tokenize(const std::string& InTxt,ETTSLanguage::Enum Language = ETTSLanguage::English);
18
void SetAllowedChars(const std::string &value);
19
};
20
21
22