Skip to content

RESTClient does not support ULAW file upload #4

@matthewmgamble

Description

@matthewmgamble

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.

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