Comments (13)
Hi @ddddm, let me look into this and talk to the team and get back to you.
@daniel-bolanos Is this something you're aware of?
from speech-javascript-sdk.
Hey @ddddm - can you get me a complete copy of the headers? In my testing, I'm not seeing any content-type header set at all, but I'm not testing on an iOS device.
I have a suspicion that the long URL may be part of the issue. The Watson service also accepts the token in a X-Watson-Authorization-Token
header or in a cookie - is it possible to set either of these in Cordova / iOS Safari?
from speech-javascript-sdk.
@nfriedly yes, I remember this issue, there was a thread about it with more details, I wish I could find it...
Dani
from speech-javascript-sdk.
Yeah sure @nfriedly!
I can't give you headers from iOS because the request never happened according to Safari DevTools:
But the error exists:
From an android device, I have this request details (might help?)
Android device's request details:
Request
GET wss://stream.watsonplatform.net/speech-to-text/api/v1/recognize?model=en-US_BroadbandModel&watson-token={token replaced} HTTP/1.1
Host: stream.watsonplatform.net
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: file://
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (Linux; Android 5.1.1; C6603 Build/10.7.A.0.222; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/54.0.2840.85 Mobile Safari/537.36
Accept-Encoding: gzip, deflate
Accept-Language: ru-RU,en-US;q=0.8
X-Requested-With: com.speakingfirst
Sec-WebSocket-Key: g0zG79DBk8z+GjAtyuXGww==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits
Response
HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Sec-WebSocket-Accept: pWe5E6BVaWWMkEK/fZQZb9RvkJM=
Sec-WebSocket-Extensions: permessage-deflate;client_max_window_bits=15
Date: Tue, 13 Dec 2016 13:11:57 GMT
Server: -
X-Global-Transaction-ID: 45984040
Content-Type:
Strict-Transport-Security: 31536000
X-DP-Watson-Tran-ID: stream-dp02-45984040
Upgrade: websocket
from speech-javascript-sdk.
Hum.. I had checked in firefox and I didn't see that but now that I'm trying in chrome, I also see the empty Content-Type header. I think either the service is sending different headers (unlikely) or firefox is not correctly displaying the empty header.
@daniel-bolanos is this something that the team can take a look at - either not creating a content-type header at all, or else setting it to something like application/json?
from speech-javascript-sdk.
Can this be related to the problem where the (authorization token) > max safari url length ??
from speech-javascript-sdk.
That might be a problem too @germanattanasio, but the service does appear to be sending an odd, perhaps even invalid header which we should probably handle first.
from speech-javascript-sdk.
@nfriedly @daniel-bolanos any updates on this?
from speech-javascript-sdk.
I believe the service team will remove the empty content-type header in an upcoming release, but I'm not sure of the timing.
from speech-javascript-sdk.
This is now fixed, https://watson-speech.mybluemix.net/file-url.html shows an example that should work on mobile Safari
from speech-javascript-sdk.
The same websocket error is throwing for me also when running ionic app in iphone device.
the error is.
failed: Failed to send WebSocket frame.
is there any solution. Please help me to solve this issue
from speech-javascript-sdk.
@Dinesh93 That is actually a different bug, and one that is outside of our control: #40
The code is fixed in webkit core, and it works in the latest preview builds of Safari 11 (on desktop and, I assume, on iPhone). Expect it to be released in a month or two, whenever Apple puts out the next major releases of macOS and iOS.
If you need a faster solution, you can use our Swift SDK to build a native (non-ionic) app: https://github.com/watson-developer-cloud/swift-sdk
from speech-javascript-sdk.
@nfriedly Thank you So much for You response
the issue comes in 10.3.1 os version of ios
10.3.3 its works fine.
from speech-javascript-sdk.
Related Issues (20)
- package.json { scripts { ... postinstall: }} only contains shell script for Linux, no batch file for Windows HOT 2
- The Javascript standalone release that isn't Webpack HOT 3
- CORS problem when getting voices () HOT 3
- Error: "Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten on Angular 7 HOT 2
- TextToSpeech for Safari iOS fix. HOT 5
- Requesting new feature to enable NLU service. HOT 3
- SpeechToText RecognizeStream stop() lag. HOT 2
- RecognizeMicrophone is not able to establish webSocket connection HOT 2
- Error during WebSocket handshake: Unexpected response code: 403 HOT 2
- REST API docs HOT 1
- Difficult integration with Create React app... HOT 2
- Please 1.0 this thing :) HOT 6
- Broken docs link HOT 5
- watsonplatform.net endpoint retirement HOT 3
- recognizeMicrophone function speechDetectorSensitivity and backgroundAudioSuppression can't set as params HOT 2
- The automated release is failing 🚨 HOT 1
- WebSocket connection error due to no access_token HOT 2
- Support for character_insertion_bias HOT 6
- Security Issue HOT 1
- Doesn't work with React 18+ HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from speech-javascript-sdk.