| 550 | }; |
| 551 | |
| 552 | core::TensorValue make_streaming_cache_input( |
| 553 | core::ModuleBuildContext & ctx, |
| 554 | VibeVoiceStreamingBuildState & state, |
| 555 | int64_t batch, |
| 556 | int64_t channels, |
| 557 | int64_t frames) { |
| 558 | if (batch <= 0 || channels <= 0 || frames <= 0) { |
| 559 | throw std::runtime_error("VibeVoice streaming cache input requires positive dimensions"); |
| 560 | } |
| 561 | auto * tensor = ggml_new_tensor_3d(ctx.ggml, GGML_TYPE_F32, frames, channels, batch); |
| 562 | ggml_set_input(tensor); |
| 563 | state.cache_inputs.push_back(tensor); |
| 564 | state.cache_bytes.push_back(static_cast<size_t>(batch * channels * frames) * sizeof(float)); |
| 565 | return core::wrap_tensor(tensor, core::TensorShape::from_dims({batch, channels, frames}), GGML_TYPE_F32); |
| 566 | } |
| 567 | |
| 568 | void add_streaming_cache_output( |
| 569 | core::ModuleBuildContext & ctx, |
no test coverage detected