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

Method run

src/models/vevo2/session.cpp:900–1075  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

898 out.generation.top_k = static_cast<int>(assets_->config.ar.generation_top_k);
899 out.generation.top_p = assets_->config.ar.generation_top_p;
900 out.generation.temperature = assets_->config.ar.generation_temperature;
901 out.generation.repetition_penalty = assets_->config.ar.generation_repetition_penalty;
902 out.generation.use_prosody_code = route_defaults_to_prosody(out.route);
903 out.generation.use_pitch_shift = route_defaults_to_pitch_shift(out.route);
904 if (const auto target_text = runtime::find_option(request.options, {"target_text"})) {
905 out.refs.target_text = *target_text;
906 }
907 if (out.path == Vevo2InferencePath::TextProsodyToTargetVoice && out.refs.target_text.empty()) {
908 throw std::runtime_error("Vevo2 text/prosody route requires text_input or target_text");
909 }
910
911 if (const auto style_ref_text = runtime::find_option(request.options, {"style_ref_text"})) {
912 out.refs.style_ref_text = *style_ref_text;
913 } else if (const auto reference_text = runtime::find_option(request.options, {"reference_text"})) {
914 out.refs.style_ref_text = *reference_text;
915 }
916 if (const auto value = runtime::find_option(request.options, {"use_prosody_code"})) {
917 out.generation.use_prosody_code = runtime::parse_bool_option(*value, "use_prosody_code");
918 }
919 if (const auto value = runtime::find_option(request.options, {"predict_target_prosody"})) {
920 out.generation.predict_target_prosody = runtime::parse_bool_option(*value, "predict_target_prosody");
921 }
922 if (const auto value = runtime::parse_int_option(request.options, {"top_k"})) {
923 out.generation.top_k = *value;
924 }
925 if (const auto value = runtime::parse_float_option(request.options, {"top_p"})) {
926 out.generation.top_p = *value;
927 }
928 if (const auto value = runtime::parse_float_option(request.options, {"temperature"})) {
929 out.generation.temperature = *value;
930 }
931 if (const auto value = runtime::parse_float_option(request.options, {"repetition_penalty"})) {
932 out.generation.repetition_penalty = *value;
933 }
934 if (const auto value = runtime::parse_int_option(request.options, {"max_tokens"})) {
935 out.generation.max_new_tokens = *value;
936 }
937 out.generation.seed = runtime::parse_u32_option(request.options, {"seed"})
938 .value_or(runtime::random_u32_seed());
939 if (const auto value = runtime::find_option(request.options, {"use_pitch_shift"})) {
940 out.generation.use_pitch_shift = runtime::parse_bool_option(*value, "use_pitch_shift");
941 }
942 if (const auto value = runtime::parse_int_option(request.options, {"source_shift_steps"})) {
943 out.generation.source_shift_steps = *value;
944 }
945 if (const auto value = runtime::parse_int_option(request.options, {"prosody_shift_steps"})) {
946 out.generation.prosody_shift_steps = *value;
947 }
948 if (const auto value = runtime::parse_int_option(request.options, {"style_shift_steps"})) {
949 out.generation.style_shift_steps = *value;
950 }
951 if (const auto value = runtime::parse_float_option(request.options, {"target_duration_seconds"})) {
952 out.generation.target_duration_seconds = *value;
953 }
954 if (const auto value = runtime::parse_float_option(request.options, {"reference_duration_seconds"})) {
955 out.generation.reference_duration_seconds = *value;
956 }
957 if (const auto value = runtime::parse_int_option(request.options, {"num_inference_steps"})) {

Callers 8

mainFunction · 0.45
run_modelMethod · 0.45
run_model_step_implFunction · 0.45
run_chunked_model_stepFunction · 0.45
run_model_step_foreachFunction · 0.45
run_offline_batchFunction · 0.45
regenerate.pyFile · 0.45

Calls 15

split_text_chunksFunction · 0.85
frame_count_24kFunction · 0.85
append_audio_bufferFunction · 0.85
generate_melMethod · 0.80
make_requestFunction · 0.50
trace_log_scalarFunction · 0.50
elapsed_msFunction · 0.50
timing_log_scalarFunction · 0.50

Tested by

no test coverage detected