Fix building wheels for macOS (#2192)

This commit is contained in:
Fangjun Kuang
2025-05-08 19:15:33 +08:00
committed by GitHub
parent baec2da745
commit 562a5f7d9b
5 changed files with 22 additions and 15 deletions

View File

@@ -78,12 +78,12 @@ bool WriteWave(const std::string &filename, int32_t sampling_rate,
WriteWave(buffer.data(), sampling_rate, samples, n);
std::ofstream os(filename, std::ios::binary);
if (!os) {
SHERPA_ONNX_LOGE("Failed to create %s", filename.c_str());
SHERPA_ONNX_LOGE("Failed to create '%s'", filename.c_str());
return false;
}
os << buffer;
if (!os) {
SHERPA_ONNX_LOGE("Write %s failed", filename.c_str());
SHERPA_ONNX_LOGE("Write '%s' failed", filename.c_str());
return false;
}
return true;