curl "Unsupported Media Type" error in IBM Speech curl "Unsupported Media Type" error in IBM Speech curl curl

curl "Unsupported Media Type" error in IBM Speech


Try passing the model=en-US_NarrowbandModel as parameter in the URL. Following curl command works for me for your wav file.

curl -X POST \-u "apikey:XXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \-H "Content-Type:audio/wav" \--data-binary @OSR_us_000_0010_8k.wav \"https://stream.watsonplatform.net/speech-to-text/api/v1/recognize?model=en-US_NarrowbandModel"{ "results": [  {     "alternatives": [        {           "confidence": 0.985,            "transcript": "the birch canoes slid on the smooth planks "        }     ],      "final": true  },