Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Support #13

Open
fear-the-reaper opened this issue Sep 5, 2024 · 0 comments
Open

Windows Support #13

fear-the-reaper opened this issue Sep 5, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@fear-the-reaper
Copy link

I was trying to run this in windows. After a tedious effort of installing the onnxruntime in windows. I tried to do
go run main.go test.wav, it gave the following error (fair warning its big)

# github.com/streamer45/silero-vad-go/speech
In file included from ./ort_bridge.h:1:0,
                 from C:\Users\Hussain Khan\go\pkg\mod\github.com\streamer45\s[email protected]\speech\detector.go:5:    
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:306:31: error: expected declaration specifiers or '...' before 'return'
 typedef _Return_type_success_(return == 0) OrtStatus* OrtStatusPtr;
                               ^
In file included from ./ort_bridge.h:1:0,
                 from C:\Users\Hussain Khan\go\pkg\mod\github.com\streamer45\s[email protected]\speech\detector.go:5:    
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:319:21: error: expected ')' before '*' token
   void*(ORT_API_CALL* Alloc)(struct OrtAllocator* this_, size_t size);                ///< Returns a pointer to an allocated block of `size` bytes
                     ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:320:20: error: expected ')' before '*' token
   void(ORT_API_CALL* Free)(struct OrtAllocator* this_, void* p);                      ///< Free a block of memory previously allocated with OrtAllocator::Alloc
                    ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:321:43: error: expected ')' before '*' token
   const struct OrtMemoryInfo*(ORT_API_CALL* Info)(const struct OrtAllocator* this_);  ///< Return a pointer to an ::OrtMemoryInfo that describes this allocator
                                           ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:327:21: error: expected ')' before '*' token
   void*(ORT_API_CALL* Reserve)(struct OrtAllocator* this_, size_t size);  ///< Returns a pointer to an allocated block of 
`size` bytes
                     ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:330:26: error: expected ')' before '*' token
 typedef void(ORT_API_CALL* OrtLoggingFunction)(
                          ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:668:29: error: expected ')' before '*' token
   const OrtApi*(ORT_API_CALL* GetApi)(uint32_t version)NO_EXCEPTION;
                             ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:674:27: error: expected ')' before '*' token
   const char*(ORT_API_CALL* GetVersionString)(void)NO_EXCEPTION;
                           ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:683:43: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'OrtGetApiBase'
 ORT_EXPORT const OrtApiBase* ORT_API_CALL OrtGetApiBase(void) NO_EXCEPTION;
                                           ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:710:32: error: expected ')' before '*' token
 typedef OrtStatus*(ORT_API_CALL* RegisterCustomOpsFn)(OrtSessionOptions* options, const OrtApiBase* api);
                                ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:719:93: error: unknown type name 'OrtStatusPtr'
 typedef void (*RunAsyncCallbackFn)(void* user_data, OrtValue** outputs, size_t num_outputs, OrtStatusPtr status);
                                                                                             ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:739:26: error: expected ')' before '*' token
   OrtStatus*(ORT_API_CALL* CreateStatus)(OrtErrorCode code, _In_ const char* msg)NO_EXCEPTION ORT_ALL_ARGS_NONNULL;       
                          ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:746:28: error: expected ')' before '*' token
   OrtErrorCode(ORT_API_CALL* GetErrorCode)(_In_ const OrtStatus* status) NO_EXCEPTION ORT_ALL_ARGS_NONNULL;
                            ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:753:27: error: expected ')' before '*' token
   const char*(ORT_API_CALL* GetErrorMessage)(_In_ const OrtStatus* status)NO_EXCEPTION ORT_ALL_ARGS_NONNULL;
                           ^
In file included from ./ort_bridge.h:1:0,
                 from C:\Users\Hussain Khan\go\pkg\mod\github.com\streamer45\s[email protected]\speech\detector.go:5:    
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:769:3: error: expected ';' before '_Check_return_'
   ORT_API2_STATUS(CreateEnv, OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out);
   ^
In file included from ./ort_bridge.h:1:0,
                 from C:\Users\Hussain Khan\go\pkg\mod\github.com\streamer45\s[email protected]\speech\detector.go:5:    
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4693:21: error: expected ')' before '*' token
   void*(ORT_API_CALL* CreateKernel)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api,
                     ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4697:27: error: expected ')' before '*' token
   const char*(ORT_API_CALL* GetName)(_In_ const struct OrtCustomOp* op);
                           ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4700:27: error: expected ')' before '*' token
   const char*(ORT_API_CALL* GetExecutionProviderType)(_In_ const struct OrtCustomOp* op);
                           ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4703:41: error: expected ')' before '*' token
   ONNXTensorElementDataType(ORT_API_CALL* GetInputType)(_In_ const struct OrtCustomOp* op, _In_ size_t index);
                                         ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4704:22: error: expected ')' before '*' token
   size_t(ORT_API_CALL* GetInputTypeCount)(_In_ const struct OrtCustomOp* op);
                      ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4705:41: error: expected ')' before '*' token
   ONNXTensorElementDataType(ORT_API_CALL* GetOutputType)(_In_ const struct OrtCustomOp* op, _In_ size_t index);
                                         ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4706:22: error: expected ')' before '*' token
   size_t(ORT_API_CALL* GetOutputTypeCount)(_In_ const struct OrtCustomOp* op);
                      ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4711:20: error: expected ')' before '*' token
   void(ORT_API_CALL* KernelCompute)(_In_ void* op_kernel, _In_ OrtKernelContext* context);
                    ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4712:20: error: expected ')' before '*' token
   void(ORT_API_CALL* KernelDestroy)(_In_ void* op_kernel);
                    ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4715:52: error: expected ')' before '*' token
   OrtCustomOpInputOutputCharacteristic(ORT_API_CALL* GetInputCharacteristic)(_In_ const struct OrtCustomOp* op, _In_ size_t index);
                                                    ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4716:52: error: expected ')' before '*' token
   OrtCustomOpInputOutputCharacteristic(ORT_API_CALL* GetOutputCharacteristic)(_In_ const struct OrtCustomOp* op, _In_ size_t index);
                                                    ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4723:26: error: expected ')' before '*' token
   OrtMemType(ORT_API_CALL* GetInputMemoryType)(_In_ const struct OrtCustomOp* op, _In_ size_t index);
                          ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4727:19: error: expected ')' before '*' token
   int(ORT_API_CALL* GetVariadicInputMinArity)(_In_ const struct OrtCustomOp* op);
                   ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4732:19: error: expected ')' before '*' token
   int(ORT_API_CALL* GetVariadicInputHomogeneity)(_In_ const struct OrtCustomOp* op);
                   ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4736:19: error: expected ')' before '*' token
   int(ORT_API_CALL* GetVariadicOutputMinArity)(_In_ const struct OrtCustomOp* op);
                   ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4741:19: error: expected ')' before '*' token
   int(ORT_API_CALL* GetVariadicOutputHomogeneity)(_In_ const struct OrtCustomOp* op);
                   ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4744:3: error: expected ';' before 'OrtStatusPtr'
   OrtStatusPtr(ORT_API_CALL* CreateKernelV2)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api,
   ^
In file included from ./ort_bridge.h:1:0,
                 from C:\Users\Hussain Khan\go\pkg\mod\github.com\streamer45\s[email protected]\speech\detector.go:5:    
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4779:1: error: expected declaration specifiers or '...' before 'return'
 ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CUDA, _In_ OrtSessionOptions* options, int device_id);
 ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4789:1: error: expected declaration specifiers or '...' before 'return'
 ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_ROCM, _In_ OrtSessionOptions* options, int device_id);
 ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4799:1: error: expected declaration specifiers or '...' before 'return'
 ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_MIGraphX, _In_ OrtSessionOptions* options, int device_id);        
 ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4809:1: error: expected declaration specifiers or '...' before 'return'
 ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Dnnl, _In_ OrtSessionOptions* options, int use_arena);
 ^
E:\onnxruntime-win-x64-1.18.1\include/onnxruntime_c_api.h:4817:1: error: expected declaration specifiers or '...' before 'return'   
 ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Tensorrt, _In_ OrtSessionOptions* options, int device_id);

Any help would be greatly appreciated!

@streamer45 streamer45 added the enhancement New feature or request label Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants