Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

export audio for win32

雾聪e144cb9dacba
diff --git a/runtime/onnxruntime/include/audio.h b/runtime/onnxruntime/include/audio.h
index 98f21693b..9edd9c946 100644
--- a/runtime/onnxruntime/include/audio.h
+++ b/runtime/onnxruntime/include/audio.h
@@ -40,7 +40,16 @@ class AudioFrame {
int global_end = 0; // the end of a frame in the global time axis. in ms
};
-class Audio {
+#ifdef _WIN32
+#ifdef _FUNASR_API_EXPORT
+#define DLLAPI __declspec(dllexport)
+#else
+#define DLLAPI __declspec(dllimport)
+#endif
+#else
+#define DLLAPI
+#endif
+class DLLAPI Audio {
private:
float *speech_data=nullptr;
int16_t *speech_buff=nullptr;