Skip to content

Conversation

@daspecster
Copy link
Contributor

@daspecster daspecster commented Oct 9, 2016

Handling bytes when encoding the request content was failing in Python 3.5.

Closes #2519.

@daspecster daspecster added the api: speech Issues related to the Speech-to-Text API. label Oct 9, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 9, 2016
if sample.content is not None:
audio = {'content': b64encode(_to_bytes(sample.content))}
audio = {'content':
b64encode(_to_bytes(sample.content)).decode('ascii')}

This comment was marked as spam.

This comment was marked as spam.

@daspecster daspecster force-pushed the fix-encoding-speech-bug-2519 branch from e3fb4a0 to 23a2979 Compare October 10, 2016 15:22
@daspecster daspecster force-pushed the fix-encoding-speech-bug-2519 branch from 23a2979 to 9e5b448 Compare October 10, 2016 16:37
@tseaver
Copy link
Contributor

tseaver commented Oct 10, 2016

LGTM

@daspecster daspecster merged commit bd80996 into googleapis:master Oct 11, 2016
@daspecster daspecster deleted the fix-encoding-speech-bug-2519 branch October 11, 2016 13:22
richkadel pushed a commit to richkadel/google-cloud-python that referenced this pull request May 6, 2017
…h-bug-2519

Speech Python 3.5 encoding content - 'not JSON serializable'
atulep pushed a commit that referenced this pull request Apr 3, 2023
Speech Python 3.5 encoding content - 'not JSON serializable'
atulep pushed a commit that referenced this pull request Apr 18, 2023
Speech Python 3.5 encoding content - 'not JSON serializable'
parthea pushed a commit that referenced this pull request Oct 22, 2023
Speech Python 3.5 encoding content - 'not JSON serializable'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: speech Issues related to the Speech-to-Text API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants