Skip to content
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

speechToText needs to specify binary mode #1

Open
BruceWilliams opened this issue Jan 23, 2014 · 0 comments
Open

speechToText needs to specify binary mode #1

BruceWilliams opened this issue Jan 23, 2014 · 0 comments

Comments

@BruceWilliams
Copy link

in the implementation of of speechToText, it currently reads from the audio file like so:

filecontents = File.read(file)

This works on Ruby 1.8, which assumes binary mode. It fails on Ruby 1.9 and later, because you have to explicitly specify binary mode:

filecontents = File.read(file, :mode => 'rb')

The symptom of the failure is that it only gets the first 8000 or so bytes of the audio file, which is enough to get processed by the back-end, but generally not enough to be properly recognized and converted to text.

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

No branches or pull requests

1 participant