Skip to content

Commit 75432a6

Browse files
arne-kapellapaparazzi0329
authored andcommitted
fix(tts,stt,version): unpinned websocket-client
fixes #810 and adds support for up to latest websocket-client (1.6.1)
1 parent c08a117 commit 75432a6

7 files changed

+7
-7
lines changed

ibm_watson/websocket/recognize_listener.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def on_error(self, ws, error):
227227
"""
228228
self.callback.on_error(error)
229229

230-
def on_close(self, ws):
230+
def on_close(self, ws, *args):
231231
"""
232232
Callback executed when websocket connection is closed
233233

ibm_watson/websocket/synthesize_listener.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def on_error(self, ws, error):
120120
"""
121121
self.callback.on_error(error)
122122

123-
def on_close(self, ws, **kwargs):
123+
def on_close(self, ws, *args, **kwargs):
124124
"""
125125
Callback executed when websocket connection is closed
126126

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ Sphinx==3.5.2
1717
bumpversion==0.6.0
1818

1919
# Web sockets
20-
websocket-client==1.1.0
20+
websocket-client>=1.1.0

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
requests>=2.0,<3.0
22
python_dateutil>=2.5.3
3-
websocket-client==1.1.0
3+
websocket-client>=1.1.0
44
ibm_cloud_sdk_core>=3.3.6, == 3.*

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
version=__version__,
2828
description='Client library to use the IBM Watson Services',
2929
packages=['ibm_watson'],
30-
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.*'],
30+
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.*'],
3131
tests_require=['responses', 'pytest', 'python_dotenv', 'pytest-rerunfailures'],
3232
license='Apache 2.0',
3333
author='IBM Watson',

test/integration/test_speech_to_text_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def on_transcription(self, transcript):
140140
interim_results=False, low_latency=False)
141141
assert test_callback.error is None
142142
assert test_callback.transcript is not None
143-
assert test_callback.transcript[0][0]['transcript'] == 'isolated tornadoes '
143+
assert test_callback.transcript[0][0]['transcript'] in ['isolated tornadoes ', 'isolated tornados ']
144144
assert test_callback.transcript[1][0]['transcript'] == 'and heavy rain '
145145

146146
def test_on_transcription_interim_results_true(self):

test/integration/test_text_to_speech_v1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def on_close(self):
163163
'She sells seashells by the seashore',
164164
test_callback,
165165
accept='audio/wav',
166-
voice='en-AU_CraigVoice')
166+
voice='en-GB_JamesV3Voice')
167167
assert test_callback.error is None
168168
assert test_callback.fd is not None
169169
assert os.stat(file).st_size > 0

0 commit comments

Comments
 (0)