Skip to content

Commit

Permalink
Merge pull request #94 from watson-developer-cloud/fix_8132
Browse files Browse the repository at this point in the history
fix: correct websocket function
  • Loading branch information
mamoonraja committed Mar 20, 2020
2 parents a3a518e + c393092 commit 231c948
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/ibm_watson/speech_to_text_v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@ def recognize_using_websocket(
require_relative("./websocket/speech_to_text_websocket_listener.rb")
headers = {}
headers = conn.default_options.headers.to_hash unless conn.default_options.headers.to_hash.empty?
@authenticator.authenticate(headers)
service_url = @service_url.gsub("https:", "wss:")
params = {
"model" => model,
Expand Down
2 changes: 2 additions & 0 deletions test/integration/test_speech_to_text_v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ def test_recognize_websocket_as_chunks
end
thr = Thread.new { speech.start }
thr.join
assert(atomic_boolean.false?)
end

def test_recognize_websocket
Expand All @@ -206,6 +207,7 @@ def test_recognize_websocket
)
thr = Thread.new { speech.start }
thr.join
assert(atomic_boolean.false?)
end

def test_inactivity_timeout_using_websocket
Expand Down

0 comments on commit 231c948

Please sign in to comment.