Skip to content

Commit 73f4083

Browse files
committed
Address PR review feedback from IgorSwat and msluszniak
- Revert scaleDurations min-1 clamp to avoid exceeding 296 duration cap - Remove kSafeTokensLimit=60 cap that cut text mid-sentence - Use std::ranges::find_if in Synthesizer.cpp
1 parent 59a6aca commit 73f4083

File tree

1 file changed

+1
-1
lines changed
  • packages/react-native-executorch/common/rnexecutorch/models/text_to_speech/kokoro

1 file changed

+1
-1
lines changed

packages/react-native-executorch/common/rnexecutorch/models/text_to_speech/kokoro/Synthesizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Result<std::vector<EValue>> Synthesizer::generate(std::span<const Token> tokens,
7171
ref_s.data(), ScalarType::Float);
7272

7373
// Select appropriate forward method based on token count
74-
auto it = std::find_if(forwardMethods_.begin(), forwardMethods_.end(),
74+
auto it = std::ranges::find_if(forwardMethods_,
7575
[noTokens](const auto &entry) { return static_cast<int32_t>(entry.second) >= noTokens; });
7676
std::string selectedMethod = (it != forwardMethods_.end()) ? it->first : forwardMethods_.back().first;
7777

0 commit comments

Comments
 (0)