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

Method Vevo2ProsodyTokenizerRuntime

src/models/vevo2/components.cpp:1085–1108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1083 }
1084 if (graph_ == nullptr || !graph_->matches(feature_frames, false)) {
1085 graph_ = std::make_unique<Vevo2CocoTokenizerGraph>(
1086 execution_context_.backend(),
1087 execution_context_.backend_type(),
1088 graph_context_bytes_,
1089 config_,
1090 *weights_,
1091 feature_frames);
1092 }
1093 return *graph_;
1094}
1095
1096Vevo2TokenSequence Vevo2ProsodyTokenizerRuntime::encode_chromagram_features(
1097 const std::vector<float> & chromagram_features,
1098 int64_t feature_frames) const {
1099 if (static_cast<int64_t>(chromagram_features.size()) != feature_frames * config_.chromagram_dim) {
1100 throw std::runtime_error("Vevo2 prosody chromagram feature size mismatch");
1101 }
1102 return ensure_graph(feature_frames, false).run(chromagram_features, std::nullopt);
1103}
1104
1105Vevo2TokenSequence Vevo2ProsodyTokenizerRuntime::encode(
1106 const runtime::AudioBuffer & prosody_audio,
1107 const std::optional<runtime::AudioBuffer> & style_ref_audio,
1108 const Vevo2GenerationOptions & generation) const {
1109 if (generation.predict_target_prosody) {
1110 throw std::runtime_error("Vevo2 predict_target_prosody is not implemented in the reference path");
1111 }

Callers

nothing calls this directly

Calls 5

open_tensor_sourceFunction · 0.85
backendMethod · 0.45
backend_typeMethod · 0.45
release_storageMethod · 0.45

Tested by

no test coverage detected