Skip to content

speechToText needs to specify binary mode #1

@BruceWilliams

Description

@BruceWilliams

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions