Skip to content

Commit

Permalink
fix typecheck errors found by linter (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
yulin-li committed Apr 23, 2021
1 parent 7978100 commit f9ea6a1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions audio/audio_input_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ func CreatePullStreamFromFormat(callback PullAudioInputStreamCallback, format *A
handle,
unsafe.Pointer(handle),
(C.CUSTOM_AUDIO_PULL_STREAM_GET_PROPERTY_CALLBACK)(unsafe.Pointer(C.cgo_audio_get_property_callback_wrapper))))
if ret != C.SPX_NOERROR {
return nil, common.NewCarbonError(ret)
}
registerCallback(handle, callback)
stream := new(PullAudioInputStream)
stream.handle = handle
Expand Down
3 changes: 3 additions & 0 deletions speech/auto_detect_source_language_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ func NewAutoDetectSourceLanguageConfigFromLanguageConfigs(configs []*SourceLangu
}
} else {
ret = uintptr(C.add_source_lang_config_to_auto_detect_source_lang_config(handle, c.getHandle()))
if ret != C.SPX_NOERROR {
return nil, common.NewCarbonError(ret)
}
}
}
return newAutoDetectSourceLanguageConfigFromHandle(handle)
Expand Down
3 changes: 3 additions & 0 deletions speech/speech_recognition_event_args.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ func (event SpeechRecognitionEventArgs) Close() {
// NewSpeechRecognitionEventArgsFromHandle creates the object from the handle (for internal use)
func NewSpeechRecognitionEventArgsFromHandle(handle common.SPXHandle) (*SpeechRecognitionEventArgs, error) {
base, err := NewRecognitionEventArgsFromHandle(handle)
if err != nil {
return nil, err
}
event := new(SpeechRecognitionEventArgs)
event.RecognitionEventArgs = *base
event.handle = uintptr2handle(handle)
Expand Down

0 comments on commit f9ea6a1

Please sign in to comment.