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

Function constant_pad_frames

src/models/vibevoice/tokenizer_audio.cpp:420–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420core::TensorValue constant_pad_frames(
421 core::ModuleBuildContext & ctx,
422 const core::TensorValue & input,
423 int64_t left,
424 int64_t right) {
425 if (left < 0 || right < 0) {
426 throw std::runtime_error("VibeVoice tokenizer constant padding must be non-negative");
427 }
428 auto out = input;
429 if (left > 0) {
430 out = modules::ConcatModule({2}).build(ctx, zero_like_frames(ctx, input, left), out);
431 }
432 if (right > 0) {
433 out = modules::ConcatModule({2}).build(ctx, out, zero_like_frames(ctx, input, right));
434 }
435 return out;
436}
437
438core::TensorValue sconv1d(
439 core::ModuleBuildContext & ctx,

Callers 2

sconv1dFunction · 0.85
sconv_depthwise1dFunction · 0.85

Calls 3

ConcatModuleClass · 0.85
zero_like_framesFunction · 0.85
buildMethod · 0.45

Tested by

no test coverage detected