10000 Print transcripts so unicode is printed properly by jerjou · Pull Request #770 · GoogleCloudPlatform/python-docs-samples · GitHub
[go: up one dir, main page]

Skip to content

Print transcripts so unicode is printed properly #770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 1, 2017
Merged

Conversation

jerjou
Copy link
Contributor
@jerjou jerjou commented Jan 31, 2017

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 31, 2017
@@ -75,7 +75,15 @@ def main(speech_file):
# [END construct_request]
# [START send_request]
response = service_request.execute()

# First print the raw json response
print(json.dumps(response))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might as well go ahead and add indent=2 to this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes. I like.

@jerjou jerjou merged commit e5e89de into master Feb 1, 2017
@jerjou jerjou deleted the speech-utf branch February 1, 2017 00:10
@puneith
Copy link
Contributor
puneith commented Feb 1, 2017

Sorry I am late. But why not print(json.dumps(item, encoding='utf8', ensure_ascii=False))?

@jerjou
Copy link
Contributor Author
jerjou commented Feb 1, 2017

Oh. Yup. That woulda worked too. I totally didn't think of the available parameters to json.dumps, clearly -_-;

@theacodes
Copy link
Contributor
theacodes commented Feb 1, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
0