/
toplib
/
OpenATC
Обзор
Документация
Войти
/
toplib
/
OpenATC
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/utils/WavLoader.h
23 строки
507 B
toplib
Add Whisper STT backend, WavLoader, and submodules; refactor HuggingFace and network clients; update build and ignore files
12 май 2026, 16:24
12 май 2026, 16:24
25894f3
Код
Авторство
О чём код?
#pragma once #include <cstdint> #include <ios> #include <string> #include <vector> #include <fstream> std::vector<std::int16_t> loadWav(const std::string& path) { std::ifstream file(path, std::ios::binary); if (!file) { throw std::runtime_error("Cannot open file"); } file.seekg(44); std::vector<std::int16_t> samples; int16_t sample; while (file.read(reinterpret_cast<char*>(&sample), sizeof(sample))) { samples.push_back(sample); } return samples; }