microsoft / cognitive-services-speech-sdk-go

Go bindings for the Microsoft Cognitive Services Speech SDK
MIT License
88 stars 29 forks source link

Samples do not build #58

Closed chrbsg closed 2 years ago

chrbsg commented 2 years ago
# github.com/Microsoft/cognitive-services-speech-sdk-go/samples/speaker_recognition
speaker_recognition/independent_identification.go:12:2: imported and not used: "github.com/Microsoft/cognitive-services-speech-sdk-go/samples/helpers"
speaker_recognition/independent_identification.go:16:84: undefined: common
speaker_recognition/independent_identification.go:23:20: outcome.profile undefined (cannot refer to unexported field or method profile)
speaker_recognition/independent_identification.go:42:37: undefined: common
speaker_recognition/independent_identification.go:43:21: undefined: VoiceProfileEnrollmentResult
speaker_recognition/independent_verification.go:12:2: imported and not used: "github.com/Microsoft/cognitive-services-speech-sdk-go/samples/helpers"
speaker_recognition/independent_verification.go:16:6: GetNewVoiceProfileFromClient redeclared in this block
    /home/chrb/git/cognitive-services-speech-sdk-go/samples/speaker_recognition/independent_identification.go:16:110: previous declaration
speaker_recognition/independent_verification.go:16:84: undefined: common
speaker_recognition/independent_verification.go:41:6: EnrollProfile redeclared in this block
    /home/chrb/git/cognitive-services-speech-sdk-go/samples/speaker_recognition/independent_identification.go:41:99: previous declaration
speaker_recognition/independent_verification.go:68:6: DeleteProfile redeclared in this block
    /home/chrb/git/cognitive-services-speech-sdk-go/samples/speaker_recognition/independent_identification.go:68:65: previous declaration
speaker_recognition/independent_identification.go:43:21: too many errors

This is Ubuntu LTS (20.04.4) with go-1.17.4

glharper commented 2 years ago

@chrbsg Thanks for using the Speech SDK and writing this issue up. I checked in some fixes for this with this commit

Could you pull latest and give this another try?

chrbsg commented 2 years ago

@glharper it fails as-is due to samples/go.mod pulling in the older version (v1.20.0) of the SDK, but if I add replace github.com/Microsoft/cognitive-services-speech-sdk-go => ../ to samples/go.mod then it builds ok. It might make sense to build the samples against the current git checkout, rather than some tag, but you could tag it and update the go.mod too.

glharper commented 2 years ago

@chrbsg Our upcoming release next month will fix this issue, since the speaker package will be in v1.21. We tend to encourage samples to run against official releases, so until the release the "replace" addition to samples/go.mod will be necessary for running against the latest commit.

jhakulin commented 2 years ago

closed as 1.22.0 release has been done.