Skip to content

fix readme example print py3 grammar error #38

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YLD10
Copy link

@YLD10 YLD10 commented Oct 17, 2023

Using Python3 will result in an error message.
image

@@ -130,9 +130,9 @@ if __name__ == '__main__':
re = ACRCloudRecognizer(config)

#recognize by file path, and skip 0 seconds from from the beginning of sys.argv[1].
print re.recognize_by_file(sys.argv[1], 0)
print(re.recognize_by_file(sys.argv[1], 0))

Choose a reason for hiding this comment

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

Suggested change
print(re.recognize_by_file(sys.argv[1], 0))
print(re.recognize_by_file(sys.argv[1], 0))


buf = open(sys.argv[1], 'rb').read()
#recognize by file_audio_buffer that read from file path, and skip 0 seconds from from the beginning of sys.argv[1].
print re.recognize_by_filebuffer(buf, 0)
print(re.recognize_by_filebuffer(buf, 0))

Choose a reason for hiding this comment

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

Suggested change
print(re.recognize_by_filebuffer(buf, 0))
print(re.recognize_by_filebuffer(buf, 0))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants