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

Function crossfade_wave

src/models/seed_vc/session.cpp:470–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468 return {};
469 }
470 const int64_t count = std::min<int64_t>(tail, static_cast<int64_t>(wave.size()));
471 return std::vector<float>(wave.end() - static_cast<std::ptrdiff_t>(count), wave.end());
472}
473
474void append_wave(std::vector<float> & output, const std::vector<float> & chunk) {
475 output.insert(output.end(), chunk.begin(), chunk.end());
476}
477
478std::vector<float> synthesize_bigvgan_fixed_chunks(
479 const engine::modules::BigVganVocoderComponent & bigvgan,
480 const std::vector<float> & mel,
481 int64_t frames,
482 int64_t hop_size,
483 int64_t active_frames,
484 int64_t overlap_frames) {
485 const int64_t channels = bigvgan.num_mels();
486 if (frames <= 0 || channels <= 0 || hop_size <= 0 || active_frames <= 0 || overlap_frames < 0 ||
487 static_cast<int64_t>(mel.size()) != channels * frames) {
488 throw std::runtime_error("Seed-VC BigVGAN fixed chunk synthesis received invalid dimensions");
489 }
490 const int64_t graph_frames = active_frames + 2 * overlap_frames;
491 if (graph_frames < active_frames) {

Callers 2

run_v2_voice_conversionFunction · 0.85

Calls 2

powFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected