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

Function decoded_batch_to_stereo

src/models/heartmula/codec.cpp:1675–1689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1673 int64_t frames,
1674 int64_t codebooks,
1675 const HeartMuLaGenerationOptions & options,
1676 uint64_t seed,
1677 uint64_t randn_philox_offset,
1678 uint64_t randn_call_offset_blocks) const {
1679 const auto & config = assets().codec_config;
1680 if (codebooks != config.num_quantizers) {
1681 throw std::runtime_error("HeartCodec detokenize codebook count mismatch");
1682 }
1683 if (!(options.codec_duration > 0.0F) || options.num_inference_steps <= 0 || !(options.codec_guidance_scale > 0.0F)) {
1684 throw std::runtime_error("HeartCodec detokenize options are invalid");
1685 }
1686 const auto sampling_policy = engine::sampling::resolve_torch_cuda_sampling_policy(
1687 backend_type(),
1688 device(),
1689 "heartmula.codec.cuda_sampling_policy",
1690 "HeartCodec",
1691 engine::sampling::TorchCudaSamplingPolicyFailureMode::StrictCuda);
1692 const int64_t original_frames = frames;

Callers 1

detokenize_codesMethod · 0.85

Calls 2

copyFunction · 0.85
beginMethod · 0.45

Tested by

no test coverage detected