Skip to content

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.

2 participants