c-api add wave write to buffer. (#1962)

Co-authored-by: jian.chen03 <jian.chen03@transwarp.io>
This commit is contained in:
cjsdurj
2025-03-10 17:21:23 +08:00
committed by GitHub
parent 6e261ed63f
commit b87fce9a7f
5 changed files with 48 additions and 8 deletions

View File

@@ -22,6 +22,11 @@ namespace sherpa_onnx {
bool WriteWave(const std::string &filename, int32_t sampling_rate,
const float *samples, int32_t n);
void WriteWave(char *buffer, int32_t sampling_rate, const float *samples,
int32_t n);
int64_t WaveFileSize(int32_t n_samples);
} // namespace sherpa_onnx
#endif // SHERPA_ONNX_CSRC_WAVE_WRITER_H_