MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / mtmd_debug_encode_audio

Function mtmd_debug_encode_audio

tools/mtmd/mtmd.cpp:1444–1461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1442}
1443
1444void mtmd_debug_encode_audio(mtmd_context * ctx, const std::vector<float> & input) {
1445 if (!ctx->ctx_a) {
1446 LOG_ERR("%s: model does not support audio input\n", __func__);
1447 return;
1448 }
1449 int n_mel = clip_get_hparams(ctx->ctx_a)->n_mel_bins;
1450 clip_image_f32 inp_audio;
1451 inp_audio.nx = input.size();
1452 inp_audio.ny = n_mel;
1453 inp_audio.buf.resize(input.size() * n_mel);
1454 for (size_t i = 0; i < input.size(); i++) {
1455 for (int j = 0; j < n_mel; j++) {
1456 inp_audio.buf[j * inp_audio.nx + i] = input[i];
1457 }
1458 }
1459 LOG_INF("%s: created input audio with nx=%d, ny=%d\n", __func__, inp_audio.nx, inp_audio.ny);
1460 mtmd_debug_encode_impl(ctx, ctx->ctx_a, inp_audio);
1461}
1462
1463void mtmd_debug_preprocess_image(mtmd_context * ctx, const std::vector<uint8_t> & rgb_values, int nx, int ny) {
1464 if (!ctx->ctx_v) {

Callers 1

mainFunction · 0.85

Calls 4

clip_get_hparamsFunction · 0.85
mtmd_debug_encode_implFunction · 0.85
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected