| 418 | } |
| 419 | |
| 420 | core::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 | |
| 438 | core::TensorValue sconv1d( |
| 439 | core::ModuleBuildContext & ctx, |
no test coverage detected