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

Method extract_features

src/models/vevo2/session.cpp:667–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665 vocoder_conv_weight_storage_type_(
666 resolve_conv_weight_type(options, "vevo2.vocoder_conv_weight_type", engine::assets::TensorStorageType::Native)),
667 whisper_frontend_([&] {
668 engine::modules::WhisperFrontendComponentConfig component_config;
669 component_config.name = "vevo2.whisper";
670 component_config.weight_context_bytes = whisper_weight_context_bytes_;
671 component_config.graph_context_bytes = whisper_graph_context_bytes_;
672 component_config.matmul_weight_storage_type = whisper_matmul_weight_storage_type_;
673 component_config.conv_weight_storage_type = whisper_conv_weight_storage_type_;
674 return engine::modules::WhisperFrontendComponent::load_openai_layout(
675 assets_->whisper_weights,
676 options.backend,
677 assets_->config.whisper,
678 std::move(component_config));
679 }()),
680 prosody_tokenizer_(
681 *assets_,
682 reference_execution_context_,
683 tokenizer_weight_context_bytes_,
684 tokenizer_graph_context_bytes_,
685 tokenizer_matmul_weight_storage_type_,
686 tokenizer_conv_weight_storage_type_),
687 content_style_tokenizer_(
688 *assets_,
689 reference_execution_context_,
690 tokenizer_weight_context_bytes_,
691 tokenizer_graph_context_bytes_,
692 tokenizer_matmul_weight_storage_type_,
693 tokenizer_conv_weight_storage_type_),
694 autoregressive_model_(
695 assets_,
696 reference_execution_context_,
697 ar_weight_context_bytes_,
698 ar_prefill_graph_context_bytes_,
699 ar_decode_graph_context_bytes_,
700 ar_weight_storage_type_),
701 flow_matching_model_(
702 *assets_,
703 execution_context(),
704 fm_weight_context_bytes_,
705 fm_graph_context_bytes_,
706 fm_matmul_weight_storage_type_,
707 fm_conv_weight_storage_type_),
708 vocoder_(
709 *assets_,
710 execution_context(),
711 vocoder_weight_context_bytes_,
712 vocoder_graph_context_bytes_,
713 vocoder_matmul_weight_storage_type_,
714 vocoder_conv_weight_storage_type_),
715 whisper_feature_cache_(kMaxAudioCacheEntries),
716 content_style_token_cache_(kMaxAudioCacheEntries) {
717 if (task_.task != runtime::VoiceTaskKind::Tts &&
718 task_.task != runtime::VoiceTaskKind::VoiceConversion &&
719 task_.task != runtime::VoiceTaskKind::SpeechToSpeech &&
720 task_.task != runtime::VoiceTaskKind::Svc) {
721 throw std::runtime_error("Vevo2 supports tts, vc, s2s, and svc tasks");
722 }
723 if (task_.mode != runtime::RunMode::Offline) {
724 throw std::runtime_error("Vevo2 currently supports offline sessions");

Callers 1

Calls 8

elapsed_msFunction · 0.50
timing_log_scalarFunction · 0.50
trace_log_scalarFunction · 0.50
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected