Use piper-phonemize to convert text to token IDs (#453)
This commit is contained in:
@@ -28,10 +28,17 @@ struct OfflineTtsConfig {
|
||||
// If there are multiple rules, they are applied from left to right.
|
||||
std::string rule_fsts;
|
||||
|
||||
// Maximum number of sentences that we process at a time.
|
||||
// This is to avoid OOM for very long input text.
|
||||
// If you set it to -1, then we process all sentences in a single batch.
|
||||
int32_t max_num_sentences = 2;
|
||||
|
||||
OfflineTtsConfig() = default;
|
||||
OfflineTtsConfig(const OfflineTtsModelConfig &model,
|
||||
const std::string &rule_fsts)
|
||||
: model(model), rule_fsts(rule_fsts) {}
|
||||
const std::string &rule_fsts, int32_t max_num_sentences)
|
||||
: model(model),
|
||||
rule_fsts(rule_fsts),
|
||||
max_num_sentences(max_num_sentences) {}
|
||||
|
||||
void Register(ParseOptions *po);
|
||||
bool Validate() const;
|
||||
|
||||
Reference in New Issue
Block a user