watson-developer-cloud / swift-sdk

:iphone: The Watson Swift SDK enables developers to quickly add Watson Cognitive Computing services to their Swift applications.
https://watson-developer-cloud.github.io/swift-sdk/
Apache License 2.0
878 stars 222 forks source link

Text to Speech fails with 'Code=400 No JSON object could be decoded' #193

Closed teddynewell closed 8 years ago

teddynewell commented 8 years ago

Looking forward to trying out text-to-speech and speech-to-text for potential use in a new app, but ran into a problem with the QuickStart example. It's the same issue described in this developerWorks question: "Watson texttospeech Code=400 No JSON object could be decoded - no sound played by app".

I have a theory it may be due to the contentType: .JSON in the WatsonRequest created in TextToSpeech().synthesize(_:voice:completionHandler:), since no content (JSON or otherwise) is added to the http message body.

glennrfisher commented 8 years ago

Thanks @teddynewell. Let's continue the conversation in the pull request.

Just an FYI, we're doing some heavy work on Speech to Text (see #187). It's almost ready--though I keep saying that and then finding subtle bugs.

Let's stay in touch about your app. Don't hesitate to reach out if you have any questions, feature requests, bugs, or comments!