MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / target_code_count

Function target_code_count

src/models/ace_step/planner.cpp:1589–1597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1587};
1588
1589int64_t target_code_count(const AceStepRequest & request, const AceStepPlan & plan) {
1590 if (request.generation.duration_seconds > 0.0F) {
1591 return static_cast<int64_t>(request.generation.duration_seconds) * 5;
1592 }
1593 if (plan.metadata.duration.has_value() && *plan.metadata.duration > 0) {
1594 return *plan.metadata.duration * 5;
1595 }
1596 throw std::runtime_error("ACE-Step planner requires a positive duration to determine target audio-code count");
1597}
1598
1599bool is_eos(const AceStepPlannerConfig & config, int32_t token) {
1600 return token == config.eos_token_id;

Callers 1

generateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected