watson-developer-cloud / go-sdk Goto Github PK
View Code? Open in Web Editor NEW:mouse: go SDK for the IBM Watson services.
License: Apache License 2.0
:mouse: go SDK for the IBM Watson services.
License: Apache License 2.0
Can text-to-speech support Chinese? I don't find the voice type stand for Chinese.
See #12 for discussion on Websocket support
Possible Solution: Open a Gorilla websocket connection with STT WS url, and perform read/write operations
Overview
encoding/json.Unmarshal
is failing to unmarshal data structure into assistantv1.DialogNode
struct
Expected behavior
By reading a JSON field from Postgresql as json.RawMessage
and unmarshaling into assistantv1.DialogNode
, the encoding/json
library should be able to parse the values into the expected objects
Actual behavior
json: cannot unmarshal object into Go struct field DialogNodeOutput.output.generic of type assistantv1.DialogNodeOutputGenericIntf
It only happens when the DialogNode has an output attribute defined
How to reproduce
json.RawMessage
fieldjson.Unmarshal
on the json.RawMessage
into an assistantv1.DialogNode
structjson.Unmarshal
Screenshots
SDK Version
github.com/watson-developer-cloud/go-sdk/v2 v2.2.0
Additional information:
Overview
I basically use a similar go application to that of the example for Speech to Text that can be found in this repository, only changes i've made were the service url, my IAM api key and the file that i want to get the text of. I basically copy-pasted the websocket example, but i'm getting
panic: websocket: close 1006 (abnormal closure): unexpected EOF
although my mp3 file doesn't seem to be corrupted.
Expected behavior
Print out the converted speech of the audio file in to text.
Actual behavior
This is the full output after running.
panic: websocket: close 1006 (abnormal closure): unexpected EOF
goroutine 14 [running]:
main.myCallBack.OnError(...)
/home/nikolas/go/src/ibmWatson/main.go:67
github.com/watson-developer-cloud/go-sdk/speechtotextv1.RecognizeListener.OnError(...)
/home/nikolas/go/src/github.com/watson-developer-cloud/go-sdk/speechtotextv1/websocket_listener.go:70
github.com/watson-developer-cloud/go-sdk/speechtotextv1.RecognizeListener.OnData(0xc0004d20e0, 0x7c6580, 0x9f63e0, 0xc0000c8000, 0xc0000891e0)
/home/nikolas/go/src/github.com/watson-developer-cloud/go-sdk/speechtotextv1/websocket_listener.go:44 +0x1ed
created by github.com/watson-developer-cloud/go-sdk/speechtotextv1.(*SpeechToTextV1).NewRecognizeListener
/home/nikolas/go/src/github.com/watson-developer-cloud/go-sdk/speechtotextv1/websocket_listener.go:128 +0x295
Process finished with exit code 2
How to reproduce
This is the actual code:
package main
import (
"encoding/json"
"fmt"
"github.com/IBM/go-sdk-core/core"
"github.com/watson-developer-cloud/go-sdk/speechtotextv1"
"os"
)
func main() {
// Instantiate the Watson Speech To Text service
service, serviceErr := speechtotextv1.
NewSpeechToTextV1(&speechtotextv1.SpeechToTextV1Options{
URL: "https://gateway-lon.watsonplatform.net/speech-to-text/api",
IAMApiKey: "<My-Key>",
})
// Check successful instantiation
if serviceErr != nil {
panic(serviceErr)
}
/* RECOGNIZE */
pwd, _ := os.Getwd()
// Open file with mp3 to recognize
audio, audioErr := os.Open(pwd + "/2019_02_27_18_46_40.mp3")
if audioErr != nil {
panic(audioErr)
}
// callbook can have `OnOpen`, `onData`, `OnClose` and `onError` functions
callback := myCallBack{}
recognizeUsingWebsocketOptions := service.
NewRecognizeUsingWebsocketOptions(audio, "audio/mp3")
recognizeUsingWebsocketOptions.
SetModel("en-US_BroadbandModel").
SetWordConfidence(true).
SetSpeakerLabels(true).
SetTimestamps(true)
service.RecognizeUsingWebsocket(recognizeUsingWebsocketOptions, callback)
}
type myCallBack struct{}
func (cb myCallBack) OnOpen() {
fmt.Println("Handshake successful")
}
func (cb myCallBack) OnClose() {
fmt.Println("Closing connection")
}
func (cb myCallBack) OnData(resp *core.DetailedResponse) {
var speechResults speechtotextv1.SpeechRecognitionResults
result := resp.GetResult().([]byte)
json.Unmarshal(result, &speechResults)
core.PrettyPrint(speechResults, "Recognized audio: ")
}
func (cb myCallBack) OnError(err error) {
panic(err)
}
SDK Version
v0.8.0
Additional information:
Additional context
Information about the mp3 file.
$ stat 2019_02_27_18_46_40.mp3
File: '2019_02_27_18_46_40.mp3'
Size: 56586239
Blocks: 110520
IO Block: 4096 regular file
Device: 804h/2052d Inode: 7602323 Links: 1
$ ffprobe 2019_02_27_18_46_40.mp3
ffprobe version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2007-2018 the FFmpeg developers
[mp3 @ 0x182ad00] Skipping 0 bytes of junk at 0.
[mp3 @ 0x182ad00] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '2019_02_27_18_46_40.mp3':
Duration: 00:58:56.64, start: 0.000000, bitrate: 127 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, mono, s16p, 128 kb/s
Overview
What is the issue? Be concise and clear.
When invoking the ListFeedback
method for Compare Comply, the response is deserialized incorrectly and this produces an error. This is either a bug in the SDK or a flaw in the example in the API ref.
Expected behavior
What did you expect to happen?
I expected the results to be printed to the screen as JSON.
Actual behavior
What actually happened?
I received the following error:
panic: An error occurred while unmarshalling the response body: 'parsing time "2019-04-02T14:11:48.938+0000": extra text: +0000'
coming from this line: panic(responseErr)
How to reproduce
Help us to reproduce what you experienced. Include your code snippets (without credentials)
Build and run this code as is:
package main
import (
"encoding/json"
"fmt"
"github.com/IBM/go-sdk-core/core"
"github.com/watson-developer-cloud/go-sdk/comparecomplyv1"
)
func main() {
authenticator := &core.IamAuthenticator{
ApiKey: "{apikey}",
}
options := &comparecomplyv1.CompareComplyV1Options{
Version: "2018-10-15",
Authenticator: authenticator,
}
compareComply, compareComplyErr := comparecomplyv1.NewCompareComplyV1(options)
if compareComplyErr != nil {
panic(compareComplyErr)
}
compareComply.SetServiceURL("{url}")
result, _, responseErr := compareComply.ListFeedback(
&comparecomplyv1.ListFeedbackOptions{},
)
if responseErr != nil {
panic(responseErr)
}
b, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(b))
}
SDK Version
Please provide the SDK version here.
1.0.0
Specifically, using local clone at comming ab836657457716599066956900b6c52d0e45c970
Additional information:
Go
are you using?When using custom parameters for STT recognize, such as BackgroundAudioSuppression
, MaxAlternatives
I noticed there is no setter forCharacterInsertionBias
.
Possible solution:
// SetCharacterInsertionBias : Allow user to set CharacterInsertionBias
func (_options *RecognizeOptions) SetCharacterInsertionBias(characterInsertionBias float32) *RecognizeOptions {
_options.CharacterInsertionBias = core.Float32Ptr(characterInsertionBias)
return _options
}
v0.2.0
Watson returns SpeechRecognitionAlternative.word_confidence as an array of ["string", int].
Should SpeechRecognitionAlternative.word_confidence type be changed to accommodate this?
Remember, an issue is not the place to ask questions. If you have issues with the APIs or have a question about the Watson services, see Stack Overflow.
Before you open an issue, please check if a similar issue already exists or has been closed before.
Check service status
Overview
What is the issue? Be concise and clear.
Compilation failed
Expected behavior
What did you expect to happen?
Compilation to succeed
Actual behavior
What actually happened?
During go build the following error was produced.
go\pkg\mod\github.com\watson-developer-cloud\[email protected]\languagetranslatorv3\language_translator_v3.go:72:41: not enough arguments in call to core.NewBaseService
have (*core.ServiceOptions)
want (*core.ServiceOptions, string, string)
How to reproduce
Help us to reproduce what you experienced. Include your code snippets (without credentials)
go get -u github.com/IBM/go-sdk-core/...
go get -u github.com/watson-developer-cloud/[email protected]
----- Code ------
package main
import (
"fmt"
"github.com/IBM/go-sdk-core/core"
"github.com/watson-developer-cloud/go-sdk/languagetranslatorv3"
)
func main() {
authenticator := &core.IamAuthenticator{
ApiKey: "{api_key}",
}
options := &languagetranslatorv3.LanguageTranslatorV3Options{
Version: "2018-05-01",
Authenticator: authenticator,
}
languageTranslator, languageTranslatorErr := languagetranslatorv3.NewLanguageTranslatorV3(options)
if languageTranslatorErr != nil {
panic(languageTranslatorErr)
}
languageTranslator.SetServiceURL("{url}")
result, _, responseErr := languageTranslator.Identify(
&languagetranslatorv3.IdentifyOptions{
Text: core.StringPtr("你好吗h"),
},
)
if responseErr != nil {
panic(responseErr)
}
//b, _ := json.MarshalIndent(result, "", " ")
fmt.Println(*result.Languages[0].Language)
}
Screenshots
If applicable, add screenshots to help explain your problem.
SDK Version
Please provide the SDK version here.
github.com/IBM/go-sdk-core v1.1.0
github.com/watson-developer-cloud/[email protected]
Additional information:
Windows 10
Go
are you using?Additional context
Add any other details about the problem.
I have checked code in language_translator_v3.go
On line 72 the call to baseService, err := core.NewBaseService(serviceOptions) was missing 2 parameters.
I have replace the line with
baseService, err := core.NewBaseService(serviceOptions, DefaultServiceName, "")
and it compiles and executed successfully.
Overview
I'm quite new to Go so it might work as intended.
When I am running the speech to text example I'm getting the error: panic: An error occurred while processing the operation response.
. However, if I just run the WebSocket part it works like a charm.
Expected behavior
I expect to get back recognized audio.
Actual behavior
I'm getting the error: An error occurred while processing the operation response
.
How to reproduce
This is how I did it:
curl https://raw.githubusercontent.com/watson-developer-cloud/go-sdk/master/examples/speechtotextv1/speech_to_text_v1.go -o speech_to_text_v1.go
curl https://raw.githubusercontent.com/watson-developer-cloud/go-sdk/master/resources/audio_example.mp3 -o audio_example.mp3
I then made the following changes:
diff --git a/speech_to_text_v1.go b/speech_to_text_v1.go
index 576f3bf..5607c2d 100644
--- a/speech_to_text_v1.go
+++ b/speech_to_text_v1.go
@@ -12,11 +12,11 @@ import (
func main() {
// Instantiate the Watson Speech To Text service
authenticator := &core.IamAuthenticator{
- ApiKey: os.Getenv("YOUR API KEY"),
+ ApiKey: "<my api key>",
}
service, serviceErr := speechtotextv1.
NewSpeechToTextV1(&speechtotextv1.SpeechToTextV1Options{
- URL: "YOUR SERVICE URL",
+ URL: "<my service url>",
Authenticator: authenticator,
})
@@ -30,7 +30,7 @@ func main() {
pwd, _ := os.Getwd()
// Open file with mp3 to recognize
- audio, audioErr := os.Open(pwd + "/../../resources/audio_example.mp3")
+ audio, audioErr := os.Open(pwd + "/audio_example.mp3")
if audioErr != nil {
panic(audioErr)
}
@@ -54,7 +54,7 @@ func main() {
}
// Example using websockets!
- audio, _ = os.Open(pwd + "/../../resources/audio_example.mp3")
+ audio, _ = os.Open(pwd + "/audio_example.mp3")
// callbook can have `OnOpen`, `onData`, `OnClose` and `onError` functions
callback := myCallBack{}
and then build and run:
$ go get github.com/IBM/go-sdk-core/core
$ go get github.com/watson-developer-cloud/go-sdk/speechtotextv1
$ go build speech_to_text_v1.go
$ ./speech_to_text_v1
panic: An error occurred while processing the operation response.
goroutine 1 [running]:
main.main()
speech_to_text_v1.go:48 +0x5bc
However, if I just run the web socket example, it works fine:
diff --git a/speech_to_text_v1.go b/speech_to_text_v1.go
index 576f3bf..2df828e 100644
--- a/speech_to_text_v1.go
+++ b/speech_to_text_v1.go
@@ -29,32 +29,8 @@ func main() {
pwd, _ := os.Getwd()
- // Open file with mp3 to recognize
- audio, audioErr := os.Open(pwd + "/../../resources/audio_example.mp3")
- if audioErr != nil {
- panic(audioErr)
- }
-
- // Create a new RecognizeOptions for ContentType "audio/mp3"
- recognizeOptions := service.
- NewRecognizeOptions(audio).
- SetContentType("audio/mp3")
-
- // Call the speechToText Recognize method
- recognizeResult, _, responseErr := service.Recognize(recognizeOptions)
-
- // Check successful call
- if responseErr != nil {
- panic(responseErr)
- }
-
- // Check successful casting
- if recognizeResult != nil {
- core.PrettyPrint(recognizeResult, "Recognize")
- }
-
// Example using websockets!
Do I miss something?
Additional information:
Overview
I am trying to send a raw audio in a file over the websocket interface by using the go sdk, but gets below error back.
{
"error": "unable to transcode data stream application/octet-stream -> audio/x-float-array "
}
Expected behavior
And the same audio file works if I use http interface instead of websockets. Since it works over http interface then using the websocket interface should not be a problem. So, by using websocket interface it should be able to send me transcript message.
Actual behavior
Recognized audio: :
{}
How to reproduce
It can be reproduced by using the default speechtotext example with raw audio file.
SDK Version
github.com/watson-developer-cloud/go-sdk/v2 v2.0.3
Additional information:
Go
are you using?go version go1.16 windows/amd64
As the title. While I was working with go-sdk for Watson Assistant, I found that the examples in the official documentation(https://cloud.ibm.com/apidocs/assistant-v1?code=go) not only doesn't work, but also does not reflect recent updates you made (554c926)
To be specific, I failed to build a go program with the example given in the current documentation, but succeeded with your updated example at the commit I mentioned.
I further found that other services have the same problem as well. And I guess it is so for all Watson products.
I think the documentations need to be synced.
Overview
Using the latest release (0.11.0) of go-sdk, the build fails.
The issue is the dependency of go-sdk-core, a new release was done 3hr ago (version 0.8.0), which modifies the core.ServiceOptions struct.
Since go-sdk doesn't specify exact version, any new project grabs the latest go-sdk-core version, and the results is that on build time it fails.
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:57:3: unknown field 'Version' in struct literal of type core.ServiceOptions
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:59:3: unknown field 'Username' in struct literal of type core.ServiceOptions
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:60:3: unknown field 'Password' in struct literal of type core.ServiceOptions
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:61:3: unknown field 'IAMApiKey' in struct literal of type core.ServiceOptions
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:62:3: unknown field 'IAMAccessToken' in struct literal of type core.ServiceOptions
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:63:3: unknown field 'IAMURL' in struct literal of type core.ServiceOptions
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:64:3: unknown field 'IAMClientId' in struct literal of type core.ServiceOptions
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:65:3: unknown field 'IAMClientSecret' in struct literal of type core.ServiceOptions
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:66:3: unknown field 'ICP4DAccessToken' in struct literal of type core.ServiceOptions
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:67:3: unknown field 'ICP4DURL' in struct literal of type core.ServiceOptions
../../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/assistantv2/assistant_v2.go:67:3: too many errors
Expected behavior
What did you expect to happen?
I will be able to build... the go-sdk should specify the go-sdk-core version (i.e. not 0.8.0)
Actual behavior
What actually happened?
build fails
How to reproduce
Help us to reproduce what you experienced. Include your code snippets (without credentials)
Clean your mod file and run "go mod tidy", it will fetch the latest and fail.
Screenshots
If applicable, add screenshots to help explain your problem.
SDK Version
Please provide the SDK version here.
Additional information:
Go
are you using?Additional context
Add any other details about the problem.
Workaround
Modify your mod file, by changing the go-sdk-core import version
github.com/IBM/go-sdk-core v0.4.2 // indirect
and then run go mod tidy
this will grab the compatible go-sdk-core release
Overview
What is the issue? Be concise and clear.
When a websocket connection cannot be established with the speechtotextv1 service, a panic happens. Specifically, when https://github.com/watson-developer-cloud/go-sdk/blob/master/speechtotextv1/websocket_listener.go#L128 throws a "websocket: bad handshake" error, a panic will result
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x91f5b7]
goroutine 61 [running]:
github.com/gorilla/websocket.(*Conn).WriteMessage(0x0, 0x1, 0xc00060ab60, 0xd8, 0xe0, 0x0, 0x0)
/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:753 +0x37
github.com/watson-developer-cloud/go-sdk/speechtotextv1.sendStartMessage(0x0, 0xc0001740f0, 0xc0001a3ab0)
/go/pkg/mod/github.com/watson-developer-cloud/[email protected]/speechtotextv1/websocket_listener.go:81 +0x8b
github.com/watson-developer-cloud/go-sdk/speechtotextv1.RecognizeListener.OnOpen(0xc000030620, 0xe45320, 0xc0003220c0, 0xc0001740f0, 0x0)
/go/pkg/mod/github.com/watson-developer-cloud/[email protected]/speechtotextv1/websocket_listener.go:25 +0x53
github.com/watson-developer-cloud/go-sdk/speechtotextv1.(*SpeechToTextV1).NewRecognizeListener(0xc000122028, 0xe45320, 0xc0003220c0, 0xc0001740f0, 0xc0001d6e40, 0x32, 0xc00011dc60, 0xc00025a240)
/go/pkg/mod/github.com/watson-developer-cloud/[email protected]/speechtotextv1/websocket_listener.go:128 +0x20b
github.com/watson-developer-cloud/go-sdk/speechtotextv1.(*SpeechToTextV1).RecognizeUsingWebsocket(0xc000122028, 0xc0001740f0, 0xe45320, 0xc0003220c0)
/go/pkg/mod/github.com/watson-developer-cloud/[email protected]/speechtotextv1/speech_to_text_v1_adapter.go:138 +0x3db
github.com/graymeta/mf2/extractors/speechwatson.processFile(0xe3c220, 0xc000122028, 0xc0005fc870, 0x29, 0x0, 0x2ada1d9c0, 0xc67c86, 0x14, 0x0, 0x0, ...)
Expected behavior
What did you expect to happen?
For a panic not to occur
Actual behavior
Paniced
SDK Version
Tested on both github.com/watson-developer-cloud/go-sdk v1.0.0 and github.com/watson-developer-cloud/go-sdk v1.2.0
Additional information:
Go
are you using?OS: Centos 7
# go version
go version go1.13.6 linux/amd64
Additional context
Add any other details about the problem.
It really feels like maybe the RecognizeUsingWebsocket
should be capable of returning an error if the websocket connection can't be opened. If you don't want to change the interface, then the rest of the package at least needs to be aware that the websocket connection could be nil and protect against that.
Hi,
I could not find an option letting the user to send the streaming audio using the golang sdk, though the same option is available in python sdk version.
I see at the moment it let you send the audio in one go. It would be better if we can have a function taking the audio channel of streaming audio and sends the stop message upon channel closure. Or through a different option.
Ryan
So that we are similar to the rest of the SDKs, rename RecognizeUsingWebsockets
to RecognizeUsingWebsocket
.
Thanks to @jeffpk62 for catching this.
Remember, an issue is not the place to ask questions. If you have issues with the APIs or have a question about the Watson services, see Stack Overflow.
Before you open an issue, please check if a similar issue already exists or has been closed before.
Check service status
Overview
What is the issue? Be concise and clear.
go run speech_to_text_v1.go fails with this error
panic: No such child resource.
goroutine 1 [running]:
main.main()
/Users/faucherd/Documents/Personal/Programming/mic-to-text/watson/go-sdk/examples/speechtotextv1/speech_to_text_v1.go:48 +0x5bc
exit status 2
Expected behavior
What did you expect to happen?
I expected the program to run and transcribe speech to text. The curl example using the same PIKey and URL works.
Actual behavior
What actually happened?
go run speech_to_text_v1.go
panic: No such child resource.
goroutine 1 [running]:
main.main()
/Users/faucherd/Documents/Personal/Programming/mic-to-text/watson/go-sdk/examples/speechtotextv1/speech_to_text_v1.go:48 +0x5bc
exit status 2
How to reproduce
Help us to reproduce what you experienced. Include your code snippets (without credentials)
macOS
Install go
go get github.com/IBM/go-sdk-core/core
go get github.com/watson-developer-cloud/go-sdk/speechtotextv1
git clone https://github.com/watson-developer-cloud/go-sdk.git
cd go-sdk/examples/speechtotextv1
update speech_to_text_v1.go for working APIKey and URL
Screenshots
If applicable, add screenshots to help explain your problem.
SDK Version
Please provide the SDK version here.
latest git clone
Additional information:
OS: for example, iOS
macOS 10.15.4
Which version of Go
are you using?
go version go1.14.2 darwin/amd64
Additional context
Add any other details about the problem.
Thank you
We plan to do a official release in late September 2019 and a release candidate in early September 2019. This issue will be updated with more specifics on timings.
These are some goals for the major release:
Creating this issue for any requirements, ideas, etc that the user community has and would like to see in the major release.
When trying to fetch logs using the fetch logs method of the SDK, the operation fails due to errors in the types.
Return a list of Watson conversation logs as a json
Received a different list of panics and errors:
panic: interface conversion: interface {} is string, not *string
github.com/watson-developer-cloud/go-sdk/assistantv1.(*Context).GetConversationID(...)
panic: interface conversion: interface {} is []interface {}, not *[]string
github.com/watson-developer-cloud/go-sdk/assistantv1.(*OutputData).GetText(...)
panic: interface conversion: interface {} is string, not *string
github.com/watson-developer-cloud/go-sdk/assistantv1.(*MessageInput).GetText(...)
panic: interface conversion: interface {} is nil, not string
github.com/watson-developer-cloud/go-sdk/assistantv1.(*MessageInput).GetText(...)
An error occurred while unmarshalling the response body: 'json: cannot unmarshal string into Go struct field MessageRequest.logs.request.alternate_intents of type bool'
Perform a simple listlogs operations
func test(workspace string) {
auth2 := core.IamAuthenticator{
ApiKey: viper.GetString("watson.apikey"),
}
service, serviceErr := assistantv1.NewAssistantV1(&assistantv1.AssistantV1Options{
Version: viper.GetString("watson.version"),
URL: viper.GetString("watson.url"),
Authenticator: &auth2,
})
if serviceErr != nil {
fmt.Println(serviceErr)
panic(serviceErr)
}
opts := getOptions(core.StringPtr(""), workspace)
service.ListLogs(opts)
result, _, responseErr := service.ListLogs(opts)
if responseErr != nil {
fmt.Println(responseErr)
panic(responseErr)
}
b, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(b))
}
func getOptions(cursor *string, workspace string) *assistantv1.ListLogsOptions {
var limit int64
limit = int64(100)
filter := getFilter()
options := assistantv1.ListLogsOptions{
WorkspaceID: core.StringPtr(viper.GetString("workspace." + workspace)),
PageLimit: &limit,
Filter: core.StringPtr(filter),
Cursor: cursor,
}
return &options
}
v1.0.0
master
branch failed. 🚨I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.
You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.
Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.
Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master
branch. You can also manually restart the failed CI job that runs semantic-release.
If you are not sure how to resolve this, here is some links that can help you:
If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.
semantic-release cannot push the version tag to the branch master
on remote Git repository with URL https://[secure]@github.com/watson-developer-cloud/go-sdk
.
Please refer to the authentication configuration documentation to configure the Git credentials on your CI environment and make sure the repositoryUrl is configured with a valid Git URL.
Good luck with your project ✨
Your semantic-release bot 📦🚀
Remember, an issue is not the place to ask questions. If you have issues with the APIs or have a question about the Watson services, see Stack Overflow.
Before you open an issue, please check if a similar issue already exists or has been closed before.
Check service status
Overview
What is the issue? Be concise and clear.
Expected behavior
What did you expect to happen?
Actual behavior
What actually happened?
How to reproduce
Help us to reproduce what you experienced. Include your code snippets (without credentials)
Screenshots
If applicable, add screenshots to help explain your problem.
SDK Version
Please provide the SDK version here.
Additional information:
Go
are you using?Additional context
Add any other details about the problem.
In order to not to confuse go-sdk api response users when processing the end/start values,
and in order to follow common milliseconds precision(prefix "milli" eq. 10^-3 according to (SI) Metric System) formatting style
and for user-friendly and evident value
As a speech-to-text service go-sdk user
I'd like to:
EG:
considering the next json response:
{...
"timestamps": [["default formatting", 1.1, 1.95], ["with single padded zero", 2.04, 3.54], ["single trailing zero", 4.00, 5.40]]
...
}
it isn't clear nor documented whether "default formatting" starts at 1s 1ms or 1s 100ms, "with single padded zero" - at 2s 4ms or 2s 40ms and "single-trailing zero" ends at 5s 40ms or 400ms.
In order to prevent confusion it would be better to format response floats according to milliseconds "common" format -
{...
"timestamps": [["default formatting", 1.100, 1.950], ["with single padded zero", 2.040, 3.540], ["single padded zero", 4.000, 5.400]]
...
}
or to return in unix timestamp like format considering the audio beginning as an epoc start:
{...
"timestamps": [["default formatting", 1100, 1950], ["with single padded zero", 2040, 3540], ["single padded zero", 4000, 5400]]
...
}
Please also take into account available limitations(eg: json size increasing) while choosing between proposals.
Overview
When I try to import the module of github.com/watson-developer-cloud, the go test
command gives the following error:
go test
github.com/watson-developer-cloud/go-sdk/texttospeechv1
../../../go/pkg/mod/github.com/watson-developer-cloud/[email protected]/texttospeechv1/text_to_speech_v1.go:81:41: not enough arguments in call to core.NewBaseService
have (*core.ServiceOptions)
want (*core.ServiceOptions, string, string)
Expected behavior
The go test
command should give no error
Actual behavior
The above error
How to reproduce
Create a new folder
Go to the new folder and create a hello world golang script
Import the module of github.com/watson-developer-cloud/go-sdk/texttospeechv1
Run go test
SDK Version
github.com/watson-developer-cloud/[email protected]
Additional information:
Hello IBM Team,
Based on the docs, it seems to be intended that we can easily start/stop an audio recognition. However, the current implementation doesn't return the websocket conn
or exposes the start and stop function
Maybe I just misunderstood but if there's a way to do it currently, I'd be glad to know.
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.