| 1371 | mark_prepared(); |
| 1372 | return; |
| 1373 | } |
| 1374 | auto sources = std::make_shared<SeedVcRouteRuntime>(impl); |
| 1375 | sources->campplus = engine::modules::CampplusEncoderComponent::load_from_tensor_source( |
| 1376 | assets_->campplus_weights, |
| 1377 | options().backend, |
| 1378 | engine::modules::CampplusEncoderConfig{ |
| 1379 | 80, 192, weight_storage_type_.value_or(engine::assets::TensorStorageType::Native)}); |
| 1380 | impl.build(*sources, options().backend, *assets_, weight_storage_type_); |
| 1381 | route_runtime_ = std::move(sources); |
| 1382 | const int64_t bigvgan_hop_size = impl.bigvgan != nullptr |
| 1383 | ? (assets_->config.*impl.bigvgan).hop_size : 0; |
| 1384 | if (bigvgan_hop_size > 0) { |
| 1385 | const int64_t channels = route_runtime_->bigvgan.num_mels(); |
| 1386 | std::vector<float> mel(static_cast<size_t>(channels * kSeedVcBigVganActiveFrames), 0.0F); |
| 1387 | (void) synthesize_bigvgan_fixed_chunks( |
| 1388 | route_runtime_->bigvgan, |
| 1389 | mel, |
| 1390 | kSeedVcBigVganActiveFrames, |
| 1391 | bigvgan_hop_size, |
| 1392 | kSeedVcBigVganActiveFrames, |
| 1393 | kSeedVcBigVganOverlapFrames); |
| 1394 | } |
| 1395 | mark_prepared(); |
| 1396 | } |
| 1397 |
no test coverage detected