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

Function tail_of

src/models/seed_vc/session.cpp:497–503  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

495 std::vector<float> waveform;
496 waveform.reserve(static_cast<size_t>(frames * hop_size));
497 std::vector<float> chunk_mel(static_cast<size_t>(channels * graph_frames), 0.0F);
498 for (int64_t position = 0; position < frames; position += active_frames) {
499 const int64_t active = std::min(active_frames, frames - position);
500 const int64_t source_start = std::max<int64_t>(0, position - overlap_frames);
501 const int64_t source_end = std::min<int64_t>(frames, position + active + overlap_frames);
502 const int64_t left_context = position - source_start;
503 const int64_t target_start = overlap_frames - left_context;
504 const int64_t copy_frames = source_end - source_start;
505 if (target_start < 0 || target_start + copy_frames > graph_frames) {
506 throw std::runtime_error("Seed-VC BigVGAN fixed chunk copy range is invalid");

Callers 2

run_v2_voice_conversionFunction · 0.85

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected