You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with open('linear.wav', 'rb') as f:
data = f.read()
s = client.sample(data, None, encoding=Encoding.LINEAR16, sample_rate=16000)
texts = client.sync_recognize(s)
Throws an error that it is not possible to convert the byte stream to JSON.
In speech/google/cloud/speech/client.py#240 the following line encodes the bytes in base64 but the return type of b64encode is still bytes.
When using the package as under with python3.5 -
Throws an error that it is not possible to convert the byte stream to JSON.
In
speech/google/cloud/speech/client.py#240the following line encodes the bytes in base64 but the return type of b64encode is still bytes.If this is changed to the following, the API behaves as expected -