Azure-Samples / cognitive-services-speech-sdk

Sample code for the Microsoft Cognitive Services Speech SDK
MIT License
2.96k stars 1.86k forks source link

Exception when compiling new linux binary with golang #2639

Open reastyn opened 4 weeks ago

reastyn commented 4 weeks ago

This bug was introduced in 1.24.1, 1.24.0 works. When I try to compile the go program with the new binary, error with


go build -o main .:
12.14 # github.com/Microsoft/cognitive-services-speech-sdk-go/common
12.14 In file included from /go/pkg/mod/github.com/!microsoft/cognitive-services-speech-sdk-go@v1.33.0/common/property_collection.go:8:
12.14 /usr/local/speechsdk/include/c_api/speechapi_c_property_bag.h:118:5: error: redeclaration of enumerator 'Speech_SegmentationMaximumTimeMs'
12.14   118 |     Speech_SegmentationMaximumTimeMs = 9004,
12.14       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12.14 /usr/local/speechsdk/include/c_api/speechapi_c_property_bag.h:117:5: note: previous definition of 'Speech_SegmentationMaximumTimeMs' with type 'int'
12.14   117 |     Speech_SegmentationMaximumTimeMs = 9003,
12.14       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```.

To reproduce the error just try to compile existing go code with the newest version of the linux binary.
rhurey commented 2 weeks ago

Thanks for reporting this.

This will be fixed in the next release. The properties should have been: Speech_SegmentationMaximumTimeMs = 9003, Speech_SegmentationStrategy = 9004,