Add Kokoro v1.1-zh (#1942)
This commit is contained in:
@@ -128,15 +128,19 @@ class KokoroMultiLangLexicon::Impl {
|
||||
}
|
||||
|
||||
for (const auto &ids : ids_vec) {
|
||||
if (ids.size() > 4) {
|
||||
if (ids.size() > 10 + 2) {
|
||||
ans.emplace_back(ids);
|
||||
} else {
|
||||
if (ans.empty()) {
|
||||
ans.emplace_back(ids);
|
||||
} else {
|
||||
ans.back().tokens.back() = ids[1];
|
||||
ans.back().tokens.insert(ans.back().tokens.end(), ids.begin() + 2,
|
||||
ids.end());
|
||||
if (ans.back().tokens.size() + ids.size() < 50) {
|
||||
ans.back().tokens.back() = ids[1];
|
||||
ans.back().tokens.insert(ans.back().tokens.end(), ids.begin() + 2,
|
||||
ids.end());
|
||||
} else {
|
||||
ans.emplace_back(ids);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@ GeneratedAudio GeneratedAudio::ScaleSilence(float scale) const {
|
||||
if (scale == 1) {
|
||||
return *this;
|
||||
}
|
||||
// if the interval is larger than 0.6 second, then we assume it is a pause
|
||||
int32_t threshold = static_cast<int32_t>(sample_rate * 0.6);
|
||||
// if the interval is larger than 0.2 second, then we assume it is a pause
|
||||
int32_t threshold = static_cast<int32_t>(sample_rate * 0.2);
|
||||
|
||||
std::vector<SilenceInterval> intervals;
|
||||
int32_t num_samples = static_cast<int32_t>(samples.size());
|
||||
|
||||
Reference in New Issue
Block a user