MCPcopy Create free account
hub / github.com/aarnphm/whispercpp / load_wav_file

Method load_wav_file

src/whispercpp/api_cpp2py_export.cc:3–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "api_cpp2py_export.h"
2
3WavFileWrapper WavFileWrapper::load_wav_file(const char *filename) {
4 std::vector<float> pcmf32;
5 std::vector<std::vector<float>> pcmf32s;
6 if (!::read_wav(filename, pcmf32, pcmf32s, false)) {
7 throw std::runtime_error("Failed to load wav file");
8 }
9 return WavFileWrapper(&pcmf32, &pcmf32s);
10}
11
12namespace py = pybind11;
13using namespace pybind11::literals;

Callers 4

transcribe_from_fileMethod · 0.80
fixture_audio_fileFunction · 0.80
test_load_wav_fileFunction · 0.80
mainFunction · 0.80

Calls 1

WavFileWrapperClass · 0.85

Tested by 2

fixture_audio_fileFunction · 0.64
test_load_wav_fileFunction · 0.64