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

RESTClient does not support ULAW file upload #4

Open
matthewmgamble opened this issue Aug 7, 2014 · 0 comments
Open

RESTClient does not support ULAW file upload #4

matthewmgamble opened this issue Aug 7, 2014 · 0 comments

Comments

@matthewmgamble
Copy link

When attempting to use the speech API with a raw ULAW file (which is supported according to the API docs) the upload fails because the content type is not set:

        {"RequestError": {
         "ServiceException": {
         "MessageId": "SVC0002",
         "Text": "Invalid input value for message part %1" ,
         "Variables" : "Content-Type"}
        }}

Looking at RESTClient.java, it appears the client only checks for WAV, Ogg, and AMR file types and if it does not find one of those it leaves the content type as null.

There are two possible fixes for this - let the user override the content type when setting the source file in the SpeechService API, or update the logic in RESTClient.java to support setting the audio/raw mime types supported by the API. The only challenge would be detecting the rate and byteorder.

matthewmgamble pushed a commit to matthewmgamble/codekit-java that referenced this issue Aug 7, 2014
Basically added mimetype as a new optional param when creating a speech upload request to override the built-in auto-detection.
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