Closed eric-bunch closed 8 years ago
Hello, can you please replace:
WebSocketClientFactory.__init__(self, url=url, headers=headers, debug=debug)
by
WebSocketClientFactory.__init__(self, url=url, headers=headers)
I wonder if a newer version of the library does not like that parameter...
please let me know how it goes and lets update the code in the repo
thank you
Dani
Thanks for the response. Removing that parameter gets it to run and do some things. But it seems like it's not transcribing. After running the command the hypotheses.txt file is empty. Here is the last bit of the output after running that same example command
2016-04-11 09:52:29-0500 [-] ./output
2016-04-11 09:52:29-0500 [-] contentType: audio/l16 queueSize: 0
2016-04-11 09:52:30-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:30-0500 [-] onOpen
2016-04-11 09:52:30-0500 [-] sendMessage(init)
2016-04-11 09:52:30-0500 [-] ./recordings/0010.wav
2016-04-11 09:52:30-0500 [-] onOpen ends
2016-04-11 09:52:37-0500 [-] onClose
2016-04-11 09:52:37-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:37-0500 [-] getUtterance: no more utterances to process, queue is empty!
2016-04-11 09:52:37-0500 [-] Stopping factory <__main__.WSInterfaceFactory object at 0x104100c90>
2016-04-11 09:52:37-0500 [-] about to stop the reactor!
2016-04-11 09:52:37-0500 [-] Main loop terminated.
2016-04-11 09:52:37-0500 [-] 0 : 1000
2016-04-11 09:52:37-0500 [-] Traceback (most recent call last):
2016-04-11 09:52:37-0500 [-] File "./sttClient.py", line 324, in <module>
2016-04-11 09:52:37-0500 [-] if value['hypothesis'][0] == "":
2016-04-11 09:52:37-0500 [-] IndexError: string index out of range
The chunk of output for the 0010.wav file is similar for the other wav files.
Hello,
it seems to work fine for me, just got it from the repo and this is my output:
2016-04-11 11:05:23-0400 [-] Log opened. 2016-04-11 11:05:23-0400 [-] ./recordings/0001.wav 2016-04-11 11:05:23-0400 [-] ./recordings/0002.wav 2016-04-11 11:05:23-0400 [-] ./recordings/0003.wav 2016-04-11 11:05:23-0400 [-] ./recordings/0004.wav 2016-04-11 11:05:23-0400 [-] ./recordings/0005.wav 2016-04-11 11:05:23-0400 [-] ./recordings/0006.wav 2016-04-11 11:05:23-0400 [-] ./recordings/0007.wav 2016-04-11 11:05:23-0400 [-] ./recordings/0008.wav 2016-04-11 11:05:23-0400 [-] ./recordings/0009.wav 2016-04-11 11:05:23-0400 [-] ./recordings/0010.wav 2016-04-11 11:05:23-0400 [-] Starting factory <main.WSInterfaceFactory object at 0x3248590> 2016-04-11 11:05:23-0400 [Uninitialized] ./output 2016-04-11 11:05:23-0400 [Uninitialized] contentType: audio/wav queueSize: 9 2016-04-11 11:05:23-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443 2016-04-11 11:05:23-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen 2016-04-11 11:05:23-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init) 2016-04-11 11:05:23-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0001.wav 2016-04-11 11:05:24-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends 2016-04-11 11:05:24-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] Text message received: { 2016-04-11 11:05:24-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "state": "listening" 2016-04-11 11:05:24-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] } 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] Text message received: { 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "results": [ 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] { 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "alternatives": [ 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] { 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "timestamps": [ 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] [ 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "several", 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] 1.0, 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] 1.57 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ] 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ], 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "transcript": "several " 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] } 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ], 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "final": false 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] } 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ], 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "result_index": 0 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] } 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] interim hyp: "several " 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] Text message received: { 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "results": [ 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] { 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "alternatives": [ 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] { 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "timestamps": [ 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] [ 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] "several", 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] 1.0, 2016-04-11 11:05:26-0400 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] 1.52 ...
can you share your full output?
Sure, here it is.
the output directory "./output" already exists, overwrite? (y/n)? y
2016-04-11 09:52:03-0500 [-] Log opened.
2016-04-11 09:52:03-0500 [-] ./recordings/0001.wav
2016-04-11 09:52:03-0500 [-] ./recordings/0002.wav
2016-04-11 09:52:03-0500 [-] ./recordings/0003.wav
2016-04-11 09:52:03-0500 [-] ./recordings/0004.wav
2016-04-11 09:52:03-0500 [-] ./recordings/0005.wav
2016-04-11 09:52:03-0500 [-] ./recordings/0006.wav
2016-04-11 09:52:03-0500 [-] ./recordings/0007.wav
2016-04-11 09:52:03-0500 [-] ./recordings/0008.wav
2016-04-11 09:52:03-0500 [-] ./recordings/0009.wav
2016-04-11 09:52:03-0500 [-] ./recordings/0010.wav
2016-04-11 09:52:03-0500 [-] Starting factory <__main__.WSInterfaceFactory object at 0x104100c90>
2016-04-11 09:52:03-0500 [-] ./output
2016-04-11 09:52:03-0500 [-] contentType: audio/l16 queueSize: 9
2016-04-11 09:52:03-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:03-0500 [-] onOpen
2016-04-11 09:52:03-0500 [-] sendMessage(init)
2016-04-11 09:52:03-0500 [-] ./recordings/0001.wav
2016-04-11 09:52:03-0500 [-] onOpen ends
2016-04-11 09:52:05-0500 [-] onClose
2016-04-11 09:52:05-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:05-0500 [-] ./output
2016-04-11 09:52:05-0500 [-] contentType: audio/l16 queueSize: 8
2016-04-11 09:52:06-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:06-0500 [-] onOpen
2016-04-11 09:52:06-0500 [-] sendMessage(init)
2016-04-11 09:52:06-0500 [-] ./recordings/0002.wav
2016-04-11 09:52:06-0500 [-] onOpen ends
2016-04-11 09:52:08-0500 [-] onClose
2016-04-11 09:52:08-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:08-0500 [-] ./output
2016-04-11 09:52:08-0500 [-] contentType: audio/l16 queueSize: 7
2016-04-11 09:52:08-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:08-0500 [-] onOpen
2016-04-11 09:52:08-0500 [-] sendMessage(init)
2016-04-11 09:52:08-0500 [-] ./recordings/0003.wav
2016-04-11 09:52:08-0500 [-] onOpen ends
2016-04-11 09:52:10-0500 [-] onClose
2016-04-11 09:52:10-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:10-0500 [-] ./output
2016-04-11 09:52:10-0500 [-] contentType: audio/l16 queueSize: 6
2016-04-11 09:52:10-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:10-0500 [-] onOpen
2016-04-11 09:52:10-0500 [-] sendMessage(init)
2016-04-11 09:52:10-0500 [-] ./recordings/0004.wav
2016-04-11 09:52:10-0500 [-] onOpen ends
2016-04-11 09:52:12-0500 [-] onClose
2016-04-11 09:52:12-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:12-0500 [-] ./output
2016-04-11 09:52:12-0500 [-] contentType: audio/l16 queueSize: 5
2016-04-11 09:52:13-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:13-0500 [-] onOpen
2016-04-11 09:52:13-0500 [-] sendMessage(init)
2016-04-11 09:52:13-0500 [-] ./recordings/0005.wav
2016-04-11 09:52:13-0500 [-] onOpen ends
2016-04-11 09:52:15-0500 [-] onClose
2016-04-11 09:52:15-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:15-0500 [-] ./output
2016-04-11 09:52:15-0500 [-] contentType: audio/l16 queueSize: 4
2016-04-11 09:52:16-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:16-0500 [-] onOpen
2016-04-11 09:52:16-0500 [-] sendMessage(init)
2016-04-11 09:52:16-0500 [-] ./recordings/0006.wav
2016-04-11 09:52:16-0500 [-] onOpen ends
2016-04-11 09:52:18-0500 [-] onClose
2016-04-11 09:52:18-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:18-0500 [-] ./output
2016-04-11 09:52:18-0500 [-] contentType: audio/l16 queueSize: 3
2016-04-11 09:52:18-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:18-0500 [-] onOpen
2016-04-11 09:52:18-0500 [-] sendMessage(init)
2016-04-11 09:52:18-0500 [-] ./recordings/0007.wav
2016-04-11 09:52:18-0500 [-] onOpen ends
2016-04-11 09:52:24-0500 [-] onClose
2016-04-11 09:52:24-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:24-0500 [-] ./output
2016-04-11 09:52:24-0500 [-] contentType: audio/l16 queueSize: 2
2016-04-11 09:52:25-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:25-0500 [-] onOpen
2016-04-11 09:52:25-0500 [-] sendMessage(init)
2016-04-11 09:52:25-0500 [-] ./recordings/0008.wav
2016-04-11 09:52:25-0500 [-] onOpen ends
2016-04-11 09:52:27-0500 [-] onClose
2016-04-11 09:52:27-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:27-0500 [-] ./output
2016-04-11 09:52:27-0500 [-] contentType: audio/l16 queueSize: 1
2016-04-11 09:52:27-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:27-0500 [-] onOpen
2016-04-11 09:52:27-0500 [-] sendMessage(init)
2016-04-11 09:52:27-0500 [-] ./recordings/0009.wav
2016-04-11 09:52:27-0500 [-] onOpen ends
2016-04-11 09:52:29-0500 [-] onClose
2016-04-11 09:52:29-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:29-0500 [-] ./output
2016-04-11 09:52:29-0500 [-] contentType: audio/l16 queueSize: 0
2016-04-11 09:52:30-0500 [-] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 09:52:30-0500 [-] onOpen
2016-04-11 09:52:30-0500 [-] sendMessage(init)
2016-04-11 09:52:30-0500 [-] ./recordings/0010.wav
2016-04-11 09:52:30-0500 [-] onOpen ends
2016-04-11 09:52:37-0500 [-] onClose
2016-04-11 09:52:37-0500 [-] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 09:52:37-0500 [-] getUtterance: no more utterances to process, queue is empty!
2016-04-11 09:52:37-0500 [-] Stopping factory <__main__.WSInterfaceFactory object at 0x104100c90>
2016-04-11 09:52:37-0500 [-] about to stop the reactor!
2016-04-11 09:52:37-0500 [-] Main loop terminated.
2016-04-11 09:52:37-0500 [-] 0 : 1000
2016-04-11 09:52:37-0500 [-] Traceback (most recent call last):
2016-04-11 09:52:37-0500 [-] File "./sttClient.py", line 324, in <module>
2016-04-11 09:52:37-0500 [-] if value['hypothesis'][0] == "":
This is still the output with removing the debug parameter. And just to make sure; the username and password are supposed to be the service credentials obtained from IBM Bluemix for the Watson STT service, correct?
Yes, the service credentials, that is right. I do not see any error messages on your output.
What is your version of Autobhan? This is mine: $ pip freeze autobahn==0.10.3
I wonder if you are using a newer version that is not working smoothly...
I had a newer version of autobahn. I have removed that and added version 0.10.3. I re-cloned the repo, to make sure I have the same thing as you, and I'm getting this output
the output directory "./output" already exists, overwrite? (y/n)? y
2016-04-11 11:19:44-0500 [-] Log opened.
2016-04-11 11:19:44-0500 [-] ./recordings/0001.wav
2016-04-11 11:19:44-0500 [-] ./recordings/0002.wav
2016-04-11 11:19:44-0500 [-] ./recordings/0003.wav
2016-04-11 11:19:44-0500 [-] ./recordings/0004.wav
2016-04-11 11:19:44-0500 [-] ./recordings/0005.wav
2016-04-11 11:19:44-0500 [-] ./recordings/0006.wav
2016-04-11 11:19:44-0500 [-] ./recordings/0007.wav
2016-04-11 11:19:44-0500 [-] ./recordings/0008.wav
2016-04-11 11:19:44-0500 [-] ./recordings/0009.wav
2016-04-11 11:19:44-0500 [-] ./recordings/0010.wav
2016-04-11 11:19:44-0500 [-] Starting factory <__main__.WSInterfaceFactory object at 0x104f59d90>
2016-04-11 11:19:44-0500 [-] ./output
2016-04-11 11:19:44-0500 [-] contentType: audio/l16 queueSize: 9
2016-04-11 11:19:44-0500 [Uninitialized] Unhandled Error
Traceback (most recent call last):
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/python/log.py", line 101, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/python/log.py", line 84, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/selectreactor.py", line 149, in _doReadOrWrite
why = getattr(selectable, method)()
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/tcp.py", line 587, in doConnect
self._connectDone()
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/tcp.py", line 616, in _connectDone
self.protocol.makeConnection(self)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/protocols/tls.py", line 317, in makeConnection
ProtocolWrapper.makeConnection(self, transport)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/protocols/policies.py", line 75, in makeConnection
self.wrappedProtocol.makeConnection(self)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/protocol.py", line 494, in makeConnection
self.connectionMade()
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/autobahn/twisted/websocket.py", line 88, in connectionMade
self._connectionMade()
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 3734, in _connectionMade
WebSocketProtocol._connectionMade(self)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 1187, in _connectionMade
self.openHandshakeTimeoutCall = txaio.call_later(self.openHandshakeTimeout, self.onOpenHandshakeTimeout)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/txaio/_unframework.py", line 43, in _throw_usage_error
"To use txaio, you must first select a framework "
exceptions.RuntimeError: To use txaio, you must first select a framework with .use_twisted() or .use_asyncio()
2016-04-11 11:19:44-0500 [Uninitialized] Unhandled Error
Traceback (most recent call last):
File "./sttClient.py", line 312, in <module>
reactor.run()
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/base.py", line 1194, in run
self.mainLoop()
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/base.py", line 1206, in mainLoop
self.doIteration(t)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/selectreactor.py", line 143, in doSelect
_logrun(selectable, _drdw, selectable, method)
--- <exception caught here> ---
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/python/log.py", line 101, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/python/log.py", line 84, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/selectreactor.py", line 154, in _doReadOrWrite
self._disconnectSelectable(selectable, why, method=="doRead")
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 258, in _disconnectSelectable
selectable.connectionLost(failure.Failure(why))
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/tcp.py", line 479, in connectionLost
self._commonConnection.connectionLost(self, reason)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/internet/tcp.py", line 293, in connectionLost
protocol.connectionLost(reason)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/protocols/tls.py", line 484, in connectionLost
ProtocolWrapper.connectionLost(self, reason)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/twisted/protocols/policies.py", line 125, in connectionLost
self.wrappedProtocol.connectionLost(reason)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/autobahn/twisted/websocket.py", line 98, in connectionLost
self._connectionLost(reason)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 3752, in _connectionLost
WebSocketProtocol._connectionLost(self, reason)
File "/Users/eric.bunch/anaconda2/lib/python2.7/site-packages/autobahn/websocket/protocol.py", line 1209, in _connectionLost
if self.autoPingPendingCall:
exceptions.AttributeError: 'WSInterfaceProtocol' object has no attribute 'autoPingPendingCall'
and it hangs until I keyboard interrupt, at which time I get
^C2016-04-11 11:22:36-0500 [-] Received SIGINT, shutting down.
2016-04-11 11:22:36-0500 [-] Main loop terminated.
2016-04-11 11:22:36-0500 [-] Traceback (most recent call last):
2016-04-11 11:22:36-0500 [-] File "./sttClient.py", line 321, in <module>
2016-04-11 11:22:37-0500 [-] if value['status']['successful'] == True:
2016-04-11 11:22:37-0500 [-] KeyError: 'successful'
Hi, what versions of Txiao and Twisted are you using?
This is what I have:
Twisted==15.1.0 txaio==1.0.0
I'm sorry you are having so many issues with the dependencies, I will need to automate/document this process so it is easier.
I have now downgraded my packages so that I have
pip freeze
autobahn==0.10.3
pyOpenSSL==16.0.0
requests==2.8.1
Twisted==13.2.0
txaio==2.0.4
to (almost) match the requirements.txt file. It's giving me nicer output, but no transcriptions yet. I'll change those to match yours, one moment.
I got an error from pip saying that it couldn't find Twisted version 15.1.0 so I installed version 15.0.0. I now have
pip freeze
autobahn==0.10.3
pyOpenSSL==16.0.0
requests==2.8.1
Twisted==15.0.0
txaio==1.0.0
And here is the output of running the example command now
the output directory "./output" already exists, overwrite? (y/n)? y
2016-04-11 11:43:15-0500 [-] Log opened.
2016-04-11 11:43:15-0500 [-] ./recordings/0001.wav
2016-04-11 11:43:15-0500 [-] ./recordings/0002.wav
2016-04-11 11:43:15-0500 [-] ./recordings/0003.wav
2016-04-11 11:43:15-0500 [-] ./recordings/0004.wav
2016-04-11 11:43:15-0500 [-] ./recordings/0005.wav
2016-04-11 11:43:15-0500 [-] ./recordings/0006.wav
2016-04-11 11:43:15-0500 [-] ./recordings/0007.wav
2016-04-11 11:43:15-0500 [-] ./recordings/0008.wav
2016-04-11 11:43:15-0500 [-] ./recordings/0009.wav
2016-04-11 11:43:15-0500 [-] ./recordings/0010.wav
2016-04-11 11:43:15-0500 [-] Starting factory <__main__.WSInterfaceFactory object at 0x104066b10>
2016-04-11 11:43:15-0500 [Uninitialized] ./output
2016-04-11 11:43:15-0500 [Uninitialized] contentType: audio/wav queueSize: 9
2016-04-11 11:43:15-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 11:43:15-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 11:43:15-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 11:43:15-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0001.wav
2016-04-11 11:43:15-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 11:43:17-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 11:43:17-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 11:43:17-0500 [Uninitialized] ./output
2016-04-11 11:43:17-0500 [Uninitialized] contentType: audio/wav queueSize: 8
2016-04-11 11:43:18-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 11:43:18-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 11:43:18-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 11:43:18-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0002.wav
2016-04-11 11:43:18-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 11:43:20-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 11:43:20-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 11:43:20-0500 [Uninitialized] ./output
2016-04-11 11:43:20-0500 [Uninitialized] contentType: audio/wav queueSize: 7
2016-04-11 11:43:20-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 11:43:20-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 11:43:20-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 11:43:20-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0003.wav
2016-04-11 11:43:20-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 11:43:22-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 11:43:22-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 11:43:22-0500 [Uninitialized] ./output
2016-04-11 11:43:22-0500 [Uninitialized] contentType: audio/wav queueSize: 6
2016-04-11 11:43:22-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 11:43:22-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 11:43:22-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 11:43:22-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0004.wav
2016-04-11 11:43:22-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 11:43:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 11:43:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 11:43:24-0500 [Uninitialized] ./output
2016-04-11 11:43:24-0500 [Uninitialized] contentType: audio/wav queueSize: 5
2016-04-11 11:43:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 11:43:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 11:43:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 11:43:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0005.wav
2016-04-11 11:43:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 11:43:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 11:43:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 11:43:26-0500 [Uninitialized] ./output
2016-04-11 11:43:26-0500 [Uninitialized] contentType: audio/wav queueSize: 4
2016-04-11 11:43:27-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 11:43:27-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 11:43:27-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 11:43:27-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0006.wav
2016-04-11 11:43:27-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 11:43:29-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 11:43:29-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 11:43:29-0500 [Uninitialized] ./output
2016-04-11 11:43:29-0500 [Uninitialized] contentType: audio/wav queueSize: 3
2016-04-11 11:43:29-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 11:43:29-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 11:43:29-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 11:43:29-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0007.wav
2016-04-11 11:43:29-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 11:43:31-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 11:43:31-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 11:43:31-0500 [Uninitialized] ./output
2016-04-11 11:43:31-0500 [Uninitialized] contentType: audio/wav queueSize: 2
2016-04-11 11:43:31-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 11:43:31-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 11:43:31-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 11:43:31-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0008.wav
2016-04-11 11:43:31-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 11:43:33-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 11:43:33-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)', 'code: ', 1006, 'clean: ', False, 'reason: ', 'connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)')
2016-04-11 11:43:33-0500 [Uninitialized] ./output
2016-04-11 11:43:33-0500 [Uninitialized] contentType: audio/wav queueSize: 1
2016-04-11 11:43:33-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 11:43:33-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 11:43:33-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 11:43:33-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0009.wav
2016-04-11 11:43:33-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 11:43:40-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 11:43:40-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 11:43:40-0500 [Uninitialized] ./output
2016-04-11 11:43:40-0500 [Uninitialized] contentType: audio/wav queueSize: 0
2016-04-11 11:43:40-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 11:43:40-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 11:43:40-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 11:43:40-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0010.wav
2016-04-11 11:43:40-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 11:43:42-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 11:43:42-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 11:43:42-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] getUtterance: no more utterances to process, queue is empty!
2016-04-11 11:43:42-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] Stopping factory <__main__.WSInterfaceFactory object at 0x104066b10>
2016-04-11 11:43:42-0500 [-] about to stop the reactor!
2016-04-11 11:43:42-0500 [-] Main loop terminated.
2016-04-11 11:43:42-0500 [-] 0 : 1000
2016-04-11 11:43:42-0500 [-] Traceback (most recent call last):
2016-04-11 11:43:42-0500 [-] File "./sttClient.py", line 324, in <module>
2016-04-11 11:43:42-0500 [-] if value['hypothesis'][0] == "":
2016-04-11 11:43:42-0500 [-] IndexError: string index out of range
Hi,
it seems we are back to square one. No error message, the connection seems to be getting closed cleanly, it seems like you never receive the "listening" message from the server even though your connection is successful... strange. I will try to find time and try with the package versions that you are trying.
one last quick thing to try, this is my version of pyOpenSSL: pyOpenSSL==0.15.1
Ok, I had tried to install that version of pyOpenSSL earlier but wasn't able to. But I have the same version as you now. And I was able to successfully install the same version of Twisted. Anyway, I now have
autobahn==0.10.3
pyOpenSSL==0.15.1
requests==2.8.1
Twisted==15.1.0
txaio==1.0.0
and the output I'm getting is this
the output directory "./output" already exists, overwrite? (y/n)? y
2016-04-11 12:16:23-0500 [-] Log opened.
2016-04-11 12:16:23-0500 [-] ./recordings/0001.wav
2016-04-11 12:16:23-0500 [-] ./recordings/0002.wav
2016-04-11 12:16:23-0500 [-] ./recordings/0003.wav
2016-04-11 12:16:23-0500 [-] ./recordings/0004.wav
2016-04-11 12:16:23-0500 [-] ./recordings/0005.wav
2016-04-11 12:16:23-0500 [-] ./recordings/0006.wav
2016-04-11 12:16:23-0500 [-] ./recordings/0007.wav
2016-04-11 12:16:23-0500 [-] ./recordings/0008.wav
2016-04-11 12:16:23-0500 [-] ./recordings/0009.wav
2016-04-11 12:16:23-0500 [-] ./recordings/0010.wav
2016-04-11 12:16:23-0500 [-] Starting factory <__main__.WSInterfaceFactory object at 0x1046678d0>
2016-04-11 12:16:23-0500 [Uninitialized] ./output
2016-04-11 12:16:23-0500 [Uninitialized] contentType: audio/wav queueSize: 9
2016-04-11 12:16:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 12:16:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 12:16:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 12:16:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0001.wav
2016-04-11 12:16:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 12:16:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 12:16:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 12:16:26-0500 [Uninitialized] ./output
2016-04-11 12:16:26-0500 [Uninitialized] contentType: audio/wav queueSize: 8
2016-04-11 12:16:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 12:16:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 12:16:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 12:16:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0002.wav
2016-04-11 12:16:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 12:16:28-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 12:16:28-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 12:16:28-0500 [Uninitialized] ./output
2016-04-11 12:16:28-0500 [Uninitialized] contentType: audio/wav queueSize: 7
2016-04-11 12:16:28-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 12:16:28-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 12:16:28-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 12:16:28-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0003.wav
2016-04-11 12:16:28-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 12:16:30-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 12:16:30-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 12:16:30-0500 [Uninitialized] ./output
2016-04-11 12:16:30-0500 [Uninitialized] contentType: audio/wav queueSize: 6
2016-04-11 12:16:30-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 12:16:30-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 12:16:30-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 12:16:30-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0004.wav
2016-04-11 12:16:30-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 12:16:32-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 12:16:32-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 12:16:32-0500 [Uninitialized] ./output
2016-04-11 12:16:32-0500 [Uninitialized] contentType: audio/wav queueSize: 5
2016-04-11 12:16:32-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 12:16:32-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 12:16:32-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 12:16:32-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0005.wav
2016-04-11 12:16:32-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 12:16:34-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 12:16:34-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 12:16:34-0500 [Uninitialized] ./output
2016-04-11 12:16:34-0500 [Uninitialized] contentType: audio/wav queueSize: 4
2016-04-11 12:16:35-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 12:16:35-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 12:16:35-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 12:16:35-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0006.wav
2016-04-11 12:16:35-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 12:16:37-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 12:16:37-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 12:16:37-0500 [Uninitialized] ./output
2016-04-11 12:16:37-0500 [Uninitialized] contentType: audio/wav queueSize: 3
2016-04-11 12:16:37-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 12:16:37-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 12:16:37-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 12:16:37-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0007.wav
2016-04-11 12:16:37-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 12:16:39-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 12:16:39-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 12:16:39-0500 [Uninitialized] ./output
2016-04-11 12:16:39-0500 [Uninitialized] contentType: audio/wav queueSize: 2
2016-04-11 12:16:39-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 12:16:39-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 12:16:39-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 12:16:39-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0008.wav
2016-04-11 12:16:39-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 12:16:41-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 12:16:41-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 12:16:41-0500 [Uninitialized] ./output
2016-04-11 12:16:41-0500 [Uninitialized] contentType: audio/wav queueSize: 1
2016-04-11 12:16:41-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 12:16:41-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 12:16:41-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 12:16:41-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0009.wav
2016-04-11 12:16:41-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 12:16:43-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 12:16:43-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 12:16:43-0500 [Uninitialized] ./output
2016-04-11 12:16:43-0500 [Uninitialized] contentType: audio/wav queueSize: 0
2016-04-11 12:16:44-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 12:16:44-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 12:16:44-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 12:16:44-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0010.wav
2016-04-11 12:16:44-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen ends
2016-04-11 12:16:46-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 12:16:46-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 12:16:46-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] getUtterance: no more utterances to process, queue is empty!
2016-04-11 12:16:46-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] Stopping factory <__main__.WSInterfaceFactory object at 0x1046678d0>
2016-04-11 12:16:46-0500 [-] about to stop the reactor!
2016-04-11 12:16:46-0500 [-] Main loop terminated.
2016-04-11 12:16:46-0500 [-] 0 : 1000
2016-04-11 12:16:46-0500 [-] Traceback (most recent call last):
2016-04-11 12:16:46-0500 [-] File "./sttClient.py", line 324, in <module>
2016-04-11 12:16:46-0500 [-] if value['hypothesis'][0] == "":
2016-04-11 12:16:46-0500 [-] IndexError: string index out of range
And thanks for taking the time to troubleshoot this, I appreciate it.
Eric, now you have the same package versions that I have, except for Requests, which should not matter since that is only for the REST part.
Any files generated under the "output" directory? Can you at least get tokens? run the script with -tokenauth Can you enable debug and see if anything obvious shows up?
factory = WSInterfaceFactory(q, summary, args.dirOutput, args.contentType, args.model, url, headers, debug=True
No files generated under the output directory. Running with -tokenauth yields much the same output as before. Setting debug=True gives tons of output, but nothing looks obviously wrong to me so far. I'm not sure what parts of the output would be useful to you. Some snippets are
2016-04-11 14:27:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] received HTTP response:
HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Sec-WebSocket-Accept: 0lno5lmiUlcQyFeT085aOmwXwMc=
Date: Mon, 11 Apr 2016 19:27:23 GMT
Server: -
Set-Cookie: Watson-DPAT=1Dw5KPYPAS6Bt9XZt3yz%2FfJSZSAi7p%2BtxJa80ktgy%2BWzoCXl3go5oB%2BAvc3B0fYS4Qd9r%2BGP%2FCuY23f4BtjgZuo%2BKaGLe6NFo2mBVdcHxH8x5xD9Y8uUWe7d5spEQ8sjshZlDfAbR4WMowud0gQ2JgtDDq9NZOD7fvpEUVkfuyv0EcXRmXikXprvaRdPbLPgyk3G0cTCWcLaviRjxsnmguneHef44W93AHfodpwc6GOX0yM3PE%2B9JWRRzFjDyyCLDMh2rF1OCB8G%2B5w4la55l20xLq3ISJNcDaucdWj%2B5QcpsN%2BKwAhHytmJiRHMuy71DnKY%2FcznMv%2B4mDVnrZNtY2cCimuzS4ieNIEBNhjT5ReQ3xumRtqCFIcCvOb%2FfRB8PcjFw3VqodmwV2gQOzuDaRxs6tIHZ%2FOvfoEIKeseCXw34CHOoB3u7RqzMIfzpMScc2N8Hy1MyounoZB1TeuAn4RSPj6ePEBNBiXYiX%2Fqrx7gqAH2G5gR3EZ3TuU%2BSVbZMAqO6fnOX%2Bf%2B6YbLIQChFsWFJ%2FUFeWwbrJbQzMmRxC32FgEhV3GB4FMwRYDIjHRtIqHAx9JW%2B7i6zW3UfhFh61CBHVBoYStNG%2BQ7PdSdxVPj%2BlQ3FFx2%2Fvzo%2F9tB4YtV5TXKNf8JEWZqC%2Bg6pCM0wC1WJunK754dRMAdDlJe3nZdr2sLX7DV8l3AwEHsFqS8HCsTiACu2krqs9F5nQq3mIyb38OTXcxK7Bd%2F6qsxU5WlDrF1JQhqPRs21lwuKzakDdY%2FCbfzZvmh%2B%2BI5f0wV27QvTAo7N1x46%2Fosnobm54zHyAce4HY8O0QGrQr0VYYZxpQEi%2F5CIk5lz3Qjz2dGeHNsRooVi7dGHKW%2B%2FTUmGamQq9IMBUpVtizOTYuySvt0; path=/speech-to-text/api; secure; HttpOnly
X-Global-Transaction-ID: 71204680
Content-Type:
X-DP-Watson-Tran-ID: stream-dp01-0b07e043-6c90-4999-bd84-6048db52f72c
Upgrade: websocket
2016-04-11 14:27:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] received HTTP status line in opening handshake : HTTP/1.1 101 Switching Protocols
2016-04-11 14:27:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] received HTTP headers in opening handshake : {u'upgrade': u'websocket', u'sec-websocket-accept': u'0lno5lmiUlcQyFeT085aOmwXwMc=', u'set-cookie': u'Watson-DPAT=1Dw5KPYPAS6Bt9XZt3yz%2FfJSZSAi7p%2BtxJa80ktgy%2BWzoCXl3go5oB%2BAvc3B0fYS4Qd9r%2BGP%2FCuY23f4BtjgZuo%2BKaGLe6NFo2mBVdcHxH8x5xD9Y8uUWe7d5spEQ8sjshZlDfAbR4WMowud0gQ2JgtDDq9NZOD7fvpEUVkfuyv0EcXRmXikXprvaRdPbLPgyk3G0cTCWcLaviRjxsnmguneHef44W93AHfodpwc6GOX0yM3PE%2B9JWRRzFjDyyCLDMh2rF1OCB8G%2B5w4la55l20xLq3ISJNcDaucdWj%2B5QcpsN%2BKwAhHytmJiRHMuy71DnKY%2FcznMv%2B4mDVnrZNtY2cCimuzS4ieNIEBNhjT5ReQ3xumRtqCFIcCvOb%2FfRB8PcjFw3VqodmwV2gQOzuDaRxs6tIHZ%2FOvfoEIKeseCXw34CHOoB3u7RqzMIfzpMScc2N8Hy1MyounoZB1TeuAn4RSPj6ePEBNBiXYiX%2Fqrx7gqAH2G5gR3EZ3TuU%2BSVbZMAqO6fnOX%2Bf%2B6YbLIQChFsWFJ%2FUFeWwbrJbQzMmRxC32FgEhV3GB4FMwRYDIjHRtIqHAx9JW%2B7i6zW3UfhFh61CBHVBoYStNG%2BQ7PdSdxVPj%2BlQ3FFx2%2Fvzo%2F9tB4YtV5TXKNf8JEWZqC%2Bg6pCM0wC1WJunK754dRMAdDlJe3nZdr2sLX7DV8l3AwEHsFqS8HCsTiACu2krqs9F5nQq3mIyb38OTXcxK7Bd%2F6qsxU5WlDrF1JQhqPRs21lwuKzakDdY%2FCbfzZvmh%2B%2BI5f0wV27QvTAo7N1x46%2Fosnobm54zHyAce4HY8O0QGrQr0VYYZxpQEi%2F5CIk5lz3Qjz2dGeHNsRooVi7dGHKW%2B%2FTUmGamQq9IMBUpVtizOTYuySvt0; path=/speech-to-text/api; secure; HttpOnly', u'server': u'-', u'x-global-transaction-id': u'71204680', u'connection': u'Upgrade', u'date': u'Mon, 11 Apr 2016 19:27:23 GMT', u'x-dp-watson-tran-id': u'stream-dp01-0b07e043-6c90-4999-bd84-6048db52f72c', u'content-type': u''}
2016-04-11 14:27:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onConnect, server connected: tcp4:158.85.132.94:443
2016-04-11 14:27:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onOpen
2016-04-11 14:27:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] sendMessage(init)
2016-04-11 14:27:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] TX Frame to tcp4:158.85.132.94:443 : fin = True, rsv = 0, opcode = 1, mask = 69dc1770, length = 188, repeat_length = None, chopsize = None, sync = False, payload = {"continuous": true, "word_confidence": true, "inactivity_timeout": 600, "interim_results": true, "action": "start", "timestamps": true, "content-type": "audio/wav", "max_alternatives": 3}
2016-04-11 14:27:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] TX Octets to tcp4:158.85.132.94:443 : sync = False, octets = 81fe00bc69dc177012fe741f07a87e1e1cb362034be637041ba9725c49fe601f1bb8481306b271190db979130cfe2d501dae621545fc351907bd740400aa7e041083631904b978051dfe2d505fec275c49fe7e1e1db96519048365151aa97b041afe2d501dae621545fc35110aa87e1f07fe2d504baf63111ba8355c49fe631904b9640408b167034be637041ba9725c49fe741f07a8721e1df1630919b9354a49fe76050db5785f1ebd615245fc351d08a4481105a8720207bd63191fb9645253fc240d
2016-04-11 14:27:24-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ./recordings/0010.wav
and
2016-04-11 14:27:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] RX Octets from tcp4:158.85.132.94:443 : octets = 880203e8
2016-04-11 14:27:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] RX Frame from tcp4:158.85.132.94:443 : fin = True, rsv = 0, opcode = 8, mask = -, length = 2, payload = 03e8
2016-04-11 14:27:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] TX Frame to tcp4:158.85.132.94:443 : fin = True, rsv = 0, opcode = 8, mask = e1ba4827, length = 2, repeat_length = None, chopsize = None, sync = False, payload = 03e8
2016-04-11 14:27:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] TX Octets to tcp4:158.85.132.94:443 : sync = False, octets = 8882e1ba4827e252
2016-04-11 14:27:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] onClose
2016-04-11 14:27:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] ('WebSocket connection closed: None', 'code: ', 1000, 'clean: ', True, 'reason: ', None)
2016-04-11 14:27:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] getUtterance: no more utterances to process, queue is empty!
2016-04-11 14:27:26-0500 [-] about to stop the reactor!
2016-04-11 14:27:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] connection to tcp4:158.85.132.94:443 lost
2016-04-11 14:27:26-0500 [WSInterfaceProtocol (TLSMemoryBIOProtocol),client] Stopping factory <__main__.WSInterfaceFactory object at 0x1061678d0>
2016-04-11 14:27:26-0500 [-] Main loop terminated.
2016-04-11 14:27:26-0500 [-] 0 : 1000
2016-04-11 14:27:26-0500 [-] Traceback (most recent call last):
2016-04-11 14:27:26-0500 [-] File "./sttClient.py", line 324, in <module>
2016-04-11 14:27:26-0500 [-] if value['hypothesis'][0] == "":
2016-04-11 14:27:26-0500 [-] IndexError: string index out of range
Eric, it seems like I will need to find some time to get the script working with the latest version of Autobann and hope that will resolve your issue. Strange that it works for me...
Ok. I will appreciate it very much if you could take some time to look at it. I'll keep playing around with it too. It seems like a few people have gotten this working, so I'm sure it's on my end. There is a working version of this!
Yeah, believe, me, I have used this extensively, with hundreds of threads in parallel, zero problems. But I have seen people struggling with the dependencies, that I need to work on making it smoother.
I've been able to get this working on a different machine than the one I was using earlier. On my Ubuntu machine, I created a virtualenv and ran pip install -r requirements.txt
. Then I had to install the package service_identity
: pip install service_identity
. So that the result of pip freeze
is exactly this
attrs==15.2.0
autobahn==0.13.1
cffi==1.5.2
cryptography==1.3.1
enum34==1.1.2
idna==2.1
ipaddress==1.0.16
pyasn1==0.1.9
pyasn1-modules==0.0.8
pycparser==2.14
pyOpenSSL==16.0.0
requests==2.9.1
service-identity==16.0.0
six==1.10.0
Twisted==16.1.1
txaio==2.3.1
zope.interface==4.1.3
Then I removed the debug parameter from WebSocketClientFactory(), and it worked!
I'm still struggling to get it working on my Mac. I have crated a conda environment (I'm using anaconda there instead of virtualenv), made sure the dependencies are the exact same as above, and removed the debug parameter, but I'm getting the output like before. Is there an appropriate replacement for the command apt-get install build-essential python-dev
?
Hi Dani,
I've been able to get it working on my mac with anaconda as well. Also just resolving dependencies. I'm not 100% sure, but I think it was the package nose
that was giving dependency errors with this. I think conda installed it as a dependency for one of the packages, while pip did not. So if I create a conda environment, and install the requirements with pip (rather than conda), and then do pip install service_identity
, as well as removing the debug parameter, everything works ok.
Thanks for your time helping me troubleshoot this, and thanks so much for writing the package in the first place! It's a huge help.
Best, Eric
Hello Eric, I'm very happy you got this to work, you have shown strong determination here, and you got it to work in two platforms. I'm sorry I could not help more, I'm super busy at the moment.
Can you please make a pull request to the repo with your changes? including dependencies and removing the 'debug' thing? That way we will have it in good shape for everybody. Also, can you please update the README file with what you have learned, I think it will be very benefitial for the community.
thanks a lot
Hello, after cloning the project and installing the requirements, I get the following output when I run the example command given (
$ python ./sttClient.py -credentials <username>:<password> -model en-US_BroadbandModel
):Any ideas on anything I'm doing wrong or how to correct this? I'm running python 2.7.11.