Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ibm_watson/websocket/recognize_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def on_error(self, ws, error):
"""
self.callback.on_error(error)

def on_close(self, ws):
def on_close(self, ws, *args):
"""
Callback executed when websocket connection is closed

Expand Down
2 changes: 1 addition & 1 deletion ibm_watson/websocket/synthesize_listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def on_error(self, ws, error):
"""
self.callback.on_error(error)

def on_close(self, ws, **kwargs):
def on_close(self, ws, *args, **kwargs):
"""
Callback executed when websocket connection is closed

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ Sphinx==3.5.2
bumpversion==0.6.0

# Web sockets
websocket-client==1.1.0
websocket-client>=1.1.0
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
requests>=2.0,<3.0
python_dateutil>=2.5.3
websocket-client==1.1.0
websocket-client>=1.1.0
ibm_cloud_sdk_core>=3.3.6, == 3.*
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
version=__version__,
description='Client library to use the IBM Watson Services',
packages=['ibm_watson'],
install_requires=['requests>=2.0, <3.0', 'python_dateutil>=2.5.3', 'websocket-client==1.1.0', 'ibm_cloud_sdk_core>=3.3.6, == 3.*'],
install_requires=['requests>=2.0, <3.0', 'python_dateutil>=2.5.3', 'websocket-client>=1.1.0', 'ibm_cloud_sdk_core>=3.3.6, == 3.*'],
tests_require=['responses', 'pytest', 'python_dotenv', 'pytest-rerunfailures'],
license='Apache 2.0',
author='IBM Watson',
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_speech_to_text_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def on_transcription(self, transcript):
interim_results=False, low_latency=False)
assert test_callback.error is None
assert test_callback.transcript is not None
assert test_callback.transcript[0][0]['transcript'] == 'isolated tornadoes '
assert test_callback.transcript[0][0]['transcript'] in ['isolated tornadoes ', 'isolated tornados ']
assert test_callback.transcript[1][0]['transcript'] == 'and heavy rain '

def test_on_transcription_interim_results_true(self):
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_text_to_speech_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def on_close(self):
'She sells seashells by the seashore',
test_callback,
accept='audio/wav',
voice='en-AU_CraigVoice')
voice='en-GB_JamesV3Voice')
assert test_callback.error is None
assert test_callback.fd is not None
assert os.stat(file).st_size > 0
Expand Down