Closed theThinkingCap closed 5 years ago
@theThinkingCap great to have you take the time for creating this PR! 🎉 We will review it shortly.
@ehdsouza Thanks for the comments!
Could you just clarify the expected websocket interactions between the client and the SDK? As in what is the expectation for the minimum amount of input you must do to get RecognizeUsingWebsockets
working.
(My interpretation of their interaction is provided in the speech to text integration test). Thanks for your help!
@theThinkingCap was looking out for something like this.
f, _ := os.Open("../resources/audio_example.mp3")
// callback listening to events
recognizeOptions := service.NewRecognizeUsingWebsocketOptions(f, "audio/mp3”, callback).
SetModel("en-US_BroadbandModel").
SetWordConfidence(true).
SetSpeakerLabels(true).
SetTimestamps(true)
With the underlying implementation with the description above.
Sorry about the delay and thanks for the feedback! I changed up the code according to your comments but if there's anything that you feel is still missing, please let me know!
@theThinkingCap thanks for the update. Please give us some time to review as I need to look more into the library you are using.
@theThinkingCap Thanks for updating the code!
@theThinkingCap We are still reviewing your PR. We will give you an update soon!
Sorry for the delay 😞
@theThinkingCap one of your test case is failing, could you fix it up. Ill run it on my local after that! Thanks again for your contributions! 🥇
@theThinkingCap I tested the functionality and it runs beautifully 😍 ❤️!!! GREAT WORK 🔥
A last thing that you would need to do is update the dep dependencies:
Simply run dep ensure
and it would update the Gopkg.lock
to thw following: OR (you could copy the below file):
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:320e7ead93de9fd2b0e59b50fd92a4d50c1f8ab455d96bc2eb083267453a9709"
name = "github.com/asaskevich/govalidator"
packages = ["."]
pruneopts = "UT"
revision = "ccb8e960c48f04d6935e72476ae4a51028f9e22f"
version = "v9"
[[projects]]
digest = "1:d689318918dac8435731a16f090349f48f3758a3dbe5f967e913185bf264abaf"
name = "github.com/cloudfoundry-community/go-cfenv"
packages = ["."]
pruneopts = "UT"
revision = "f920e9562d5f951cbf11785728f67258c38a10d0"
version = "v1.17.0"
[[projects]]
digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec"
name = "github.com/davecgh/go-spew"
packages = ["spew"]
pruneopts = "UT"
revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73"
version = "v1.1.1"
[[projects]]
branch = "master"
digest = "1:7fb51688eadf38272411852d7a2b3538c7caff53309abee6c0964a83c00fe69e"
name = "github.com/globalsign/mgo"
packages = [
"bson",
"internal/json",
]
pruneopts = "UT"
revision = "1ca0a4f7cbcbe61c005d1bd43fdd8bb8b71df6bc"
[[projects]]
digest = "1:ac4b35a4bba11edb2110fca0707bae03ae92fbd8222e6b483465d98efaabfb97"
name = "github.com/go-openapi/errors"
packages = ["."]
pruneopts = "UT"
revision = "d9664f9fab8994271e573ed69cf2adfc09b7a800"
version = "v0.17.0"
[[projects]]
digest = "1:a4235bc1ae951c708bbf46cee7874ebb88e664614a98a7403fb115bb400c231c"
name = "github.com/go-openapi/strfmt"
packages = ["."]
pruneopts = "UT"
revision = "35fe47352985e13cc75f13120d70d26fd764ed51"
version = "v0.17.0"
[[projects]]
digest = "1:e1ff887e232b2d8f4f7c7db15a5fac7be418025afc4dda53c59c765dbb5aa6b4"
name = "github.com/go-playground/locales"
packages = [
".",
"currency",
]
pruneopts = "UT"
revision = "f63010822830b6fe52288ee52d5a1151088ce039"
version = "v0.12.1"
[[projects]]
digest = "1:e022cf244bcac1b6ef933f1a2e0adcf6a6dfd7b872d8d41e4d4179bb09a87cbc"
name = "github.com/go-playground/universal-translator"
packages = ["."]
pruneopts = "UT"
revision = "b32fa301c9fe55953584134cb6853a13c87ec0a1"
version = "v0.16.0"
[[projects]]
digest = "1:7b5c6e2eeaa9ae5907c391a91c132abfd5c9e8a784a341b5625e750c67e6825d"
name = "github.com/gorilla/websocket"
packages = ["."]
pruneopts = "UT"
revision = "66b9c49e59c6c48f0ffce28c2d8b8a5678502c6d"
version = "v1.4.0"
[[projects]]
branch = "master"
digest = "1:59392ed8afb901aab4287d4894df8191722e34f3957716f4350c8c133ce99046"
name = "github.com/hpcloud/tail"
packages = [
".",
"ratelimiter",
"util",
"watch",
"winfile",
]
pruneopts = "UT"
revision = "a1dbeea552b7c8df4b542c66073e393de198a800"
[[projects]]
digest = "1:ecd9aa82687cf31d1585d4ac61d0ba180e42e8a6182b85bd785fcca8dfeefc1b"
name = "github.com/joho/godotenv"
packages = ["."]
pruneopts = "UT"
revision = "23d116af351c84513e1946b527c88823e476be13"
version = "v1.3.0"
[[projects]]
branch = "master"
digest = "1:84a5a2b67486d5d67060ac393aa255d05d24ed5ee41daecd5635ec22657b6492"
name = "github.com/mailru/easyjson"
packages = [
"buffer",
"jlexer",
"jwriter",
]
pruneopts = "UT"
revision = "60711f1a8329503b04e1c88535f419d0bb440bff"
[[projects]]
digest = "1:53bc4cd4914cd7cd52139990d5170d6dc99067ae31c56530621b18b35fc30318"
name = "github.com/mitchellh/mapstructure"
packages = ["."]
pruneopts = "UT"
revision = "3536a929edddb9a5b34bd6861dc4a9647cb459fe"
version = "v1.1.2"
[[projects]]
digest = "1:42e29deef12327a69123b9cb2cb45fee4af5c12c2a23c6e477338279a052703f"
name = "github.com/onsi/ginkgo"
packages = [
".",
"config",
"internal/codelocation",
"internal/containernode",
"internal/failer",
"internal/leafnodes",
"internal/remote",
"internal/spec",
"internal/spec_iterator",
"internal/specrunner",
"internal/suite",
"internal/testingtproxy",
"internal/writer",
"reporters",
"reporters/stenographer",
"reporters/stenographer/support/go-colorable",
"reporters/stenographer/support/go-isatty",
"types",
]
pruneopts = "UT"
revision = "3774a09d95489ccaa16032e0770d08ea77ba6184"
version = "v1.6.0"
[[projects]]
digest = "1:ab54eea8d482272009e9e4af07d4d9b5236c27b4d8c54a3f2c99d163be883eca"
name = "github.com/onsi/gomega"
packages = [
".",
"format",
"internal/assertion",
"internal/asyncassertion",
"internal/oraclematcher",
"internal/testingtsupport",
"matchers",
"matchers/support/goraph/bipartitegraph",
"matchers/support/goraph/edge",
"matchers/support/goraph/node",
"matchers/support/goraph/util",
"types",
]
pruneopts = "UT"
revision = "7615b9433f86a8bdf29709bf288bc4fd0636a369"
version = "v1.4.2"
[[projects]]
digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
name = "github.com/pmezard/go-difflib"
packages = ["difflib"]
pruneopts = "UT"
revision = "792786c7400a136282c1664665ae0a8db921c6c2"
version = "v1.0.0"
[[projects]]
digest = "1:18752d0b95816a1b777505a97f71c7467a8445b8ffb55631a7bf779f6ba4fa83"
name = "github.com/stretchr/testify"
packages = ["assert"]
pruneopts = "UT"
revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
version = "v1.2.2"
[[projects]]
branch = "master"
digest = "1:5193d913046443e59093d66a97a40c51f4a5ea4ceba60f3b3ecf89694de5d16f"
name = "golang.org/x/net"
packages = [
"html",
"html/atom",
"html/charset",
]
pruneopts = "UT"
revision = "146acd28ed5894421fb5aac80ca93bc1b1f46f87"
[[projects]]
branch = "master"
digest = "1:c2789211d4035eb0843b85958ecf7cb4a5ea91c2d4decee652c94ce898e433cb"
name = "golang.org/x/sys"
packages = ["unix"]
pruneopts = "UT"
revision = "4497e2df6f9e69048a54498c7affbbec3294ad47"
[[projects]]
digest = "1:aa4d6967a3237f8367b6bf91503964a77183ecf696f1273e8ad3551bb4412b5f"
name = "golang.org/x/text"
packages = [
"encoding",
"encoding/charmap",
"encoding/htmlindex",
"encoding/internal",
"encoding/internal/identifier",
"encoding/japanese",
"encoding/korean",
"encoding/simplifiedchinese",
"encoding/traditionalchinese",
"encoding/unicode",
"internal/gen",
"internal/tag",
"internal/utf8internal",
"language",
"runes",
"transform",
"unicode/cldr",
]
pruneopts = "UT"
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
version = "v0.3.0"
[[projects]]
digest = "1:abeb38ade3f32a92943e5be54f55ed6d6e3b6602761d74b4aab4c9dd45c18abd"
name = "gopkg.in/fsnotify/fsnotify.v1"
packages = ["."]
pruneopts = "UT"
revision = "c2828203cd70a50dcccfb2761f8b1f8ceef9a8e9"
version = "v1.4.7"
[[projects]]
digest = "1:e2f64cca6e235f32cd4c2f9be9ae0cda1f8608fc6fdb68936e8d10e4e0bb074d"
name = "gopkg.in/go-playground/validator.v9"
packages = ["."]
pruneopts = "UT"
revision = "e69e9a28bb62b977fdc58d051f1bb477b7cbe486"
version = "v9.21.0"
[[projects]]
digest = "1:3c839a777de0e6da035c9de900b60cbec463b0a89351192c1ea083eaf9e0fce0"
name = "gopkg.in/tomb.v1"
packages = ["."]
pruneopts = "UT"
revision = "c131134a1947e9afd9cecfe11f4c6dff0732ae58"
[[projects]]
digest = "1:342378ac4dcb378a5448dd723f0784ae519383532f5e70ade24132c4c8693202"
name = "gopkg.in/yaml.v2"
packages = ["."]
pruneopts = "UT"
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
version = "v2.2.1"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = [
"github.com/cloudfoundry-community/go-cfenv",
"github.com/go-openapi/strfmt",
"github.com/gorilla/websocket",
"github.com/joho/godotenv",
"github.com/onsi/ginkgo",
"github.com/onsi/gomega",
"github.com/stretchr/testify/assert",
"gopkg.in/go-playground/validator.v9",
]
solver-name = "gps-cdcl"
solver-version = 1
Thanks for the PR 🥇
:tada: This PR is included in version 0.7.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Summary (Reopened on new fork) Implements
RecognizeUsingWebsockets(RecognizeOptions, websocketListener)
support as outlined in #14Please Note RecognizeOptions must set AudioMetaData to enable websocket functionality Instantiate websocketListener via WebsocketListenerFactory