Closed daehyunryu closed 2 years ago
Websocket trace is enabled. websocket.enableTrace(True)
should be commented in recognize_listener.py and synthesize_listener.py?
Were you able to solve this issue? I am also not able to get transcript for a streaming audio
@Kaustubh0699
Not really. Do you see same hex data? As temporary workaroud, try again after commenting out websocket.enableTrace(True)
in recognize_listener.py and synthesize_listener.py of watson lib.
Got a temporary workaround . Try this...... Insert the second line where above where you create the pyaudio stream object. This will disable all the loggings and output would be cleaner.
import logging logging.disable(logging.CRITICAL)
Disabling my own logging is not really an option, why did this not get any attention yet? Having a released library dump out every single byte it sends over to you is really annoying.
@apaparazzi0329 can you please take a look
@johann-petrak I am looking into this issue at the moment. Any suggestions and PRs are greatly appreciated. @daehyunryu your suggestion looks very promising I will look into that first.
@apaparazzi0329 as I wrote in #813, this seems to happen because of https://github.com/watson-developer-cloud/python-sdk/blob/e8a2f1883822f0ad2d655d31a595dbd93f5c81c9/ibm_watson/websocket/recognize_listener.py#L56 It should be sufficient to just remove that line for the release code.
Note that this line is also present in SynthesizeListener, see https://github.com/watson-developer-cloud/python-sdk/blob/e8a2f1883822f0ad2d655d31a595dbd93f5c81c9/ibm_watson/websocket/synthesize_listener.py#L47 where it probably should also get removed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Overview Watson stt examples print out bunch of hex data. I have plan to use it with Watson assistant and tts as well.
Expected behavior Expected to get only json output
How to reproduce Clone and ran microphone-speech-to-text.py and speech_to_text_v1.py example. microphone-speech-to-text.py prints out just bunch of hex code.
Screenshots
SDK Version ibm-cloud-sdk-core 3.12.0 ibm-watson 5.3.0
Additional information:
Python
are you using? 3.9.1Additional context I used en-US_Broadband_sample1.wav file from the link