fix for uploaded wav files being incomplete due to fragmentation when converting to b64

This commit is contained in:
Concedo 2024-10-20 17:47:19 +08:00
parent a9dbcdd3ec
commit 6da5a63852
2 changed files with 12 additions and 4 deletions

View file

@ -102,6 +102,11 @@ static bool read_wav(const std::string & b64data, std::vector<float>& pcmf32, st
std::vector<float> raw_pcm;
raw_pcm.resize(n);
if(whisperdebugmode==1)
{
printf("\nwav_data_size: %d, n:%d",wav_data.size(),n);
}
// convert to mono, float
if (wav.channels == 1) {
for (uint64_t i = 0; i < n; i++) {