Amazon Transcribe Streaming service request in Node.js with Http/2 gives no response Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Amazon Transcribe Streaming API without SDKHow is an HTTP POST request made in node.js?Uncompress gzipped http request body to json in Node.jsFailed Amazon SQS requestNode.js quick file server (static files over HTTP)SQS Receive Message RequestAWS Spark Cluster setup errorsGetting “SignatureDoesNotMatch” error with delete Bucket Replication operation in Amazon s3Amazon Transcribe Streaming API without SDKPut Object requests with Object Lock parameters require AWS Signature Version 4How to send gatling request with AWS Signature Version 4?
Can two people see the same photon?
 
 Is there night in Alpha Complex?
 
 3D Masyu - A Die
 
 .bashrc alias for a command with fixed second parameter
 
 Noise in Eigenvalues plot
 
 Why complex landing gears are used instead of simple, reliable and light weight muscle wire or shape memory alloys?
 
 Did pre-Columbian Americans know the spherical shape of the Earth?
 
 Short story about astronauts fertilizing soil with their own bodies
 
 Dinosaur Word Search, Letter Solve, and Unscramble
 
 Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?
 
 Understanding piped commands in GNU/Linux
 
 Flight departed from the gate 5 min before scheduled departure time. Refund options
 
 Table formatting with tabularx?
 
 Why does BitLocker not use RSA?
 
 Improvising over quartal voicings
 
 calculator's angle answer for trig ratios that can work in more than 1 quadrant on the unit circle
 
 Is a copyright notice with a non-existent name be invalid?
 
 How to resize main filesystem
 
 Fit odd number of triplets in a measure?
 
 What are some likely causes to domain member PC losing contact to domain controller?
 
 Why is there so little support for joining EFTA in the British parliament?
 
 Do i imagine the linear (straight line) homotopy in a correct way?
 
 How do you cope with tons of web fonts when copying and pasting from web pages?
 
 Does a random sequence of vectors span a Hilbert space?
Amazon Transcribe Streaming service request in Node.js with Http/2 gives no response
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!Amazon Transcribe Streaming API without SDKHow is an HTTP POST request made in node.js?Uncompress gzipped http request body to json in Node.jsFailed Amazon SQS requestNode.js quick file server (static files over HTTP)SQS Receive Message RequestAWS Spark Cluster setup errorsGetting “SignatureDoesNotMatch” error with delete Bucket Replication operation in Amazon s3Amazon Transcribe Streaming API without SDKPut Object requests with Object Lock parameters require AWS Signature Version 4How to send gatling request with AWS Signature Version 4?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I am trying to use Amazon Transcribe Streaming Service with a http2 request from Node.js, Here is the documentation links that I am following
Streaming request format. According to this document end point is https://transcribe-streaming.<'region'>.amazonaws.com, but making a request to this url gives url not found error.
But in the Java Example found end point as https://transcribestreaming.''.amazonaws.com, so making a request to this url does not give any error or response back. I am trying from us-east-1 region.
Here is the code I am trying with.
const http2 = require('http2');
var aws4 = require('aws4');
var opts = 
 service: 'transcribe', 
 region: 'us-east-1', 
 path: '/stream-transcription', 
 headers:
 'content-type': 'application/json',
 'x-amz-target': 'com.amazonaws.transcribe.Transcribe.StartStreamTranscription'
 
var urlObj = aws4.sign(opts, accessKeyId: '<access key>', secretAccessKey: '<aws secret>');
client.on('error', function(err)
 console.error("error in request ",err);
);
const req = client.request(
 ':method': 'POST',
 ':path': '/stream-transcription',
 'authorization': urlObj.headers.Authorization, 
 'content-type': 'application/json',
 'x-amz-content-sha256': 'STREAMING-AWS4-HMAC-SHA256-EVENTS',
 'x-amz-target': 'com.amazonaws.transcribe.Transcribe.StartStreamTranscription',
 'x-amz-date': urlObj['headers']['X-Amz-Date'],
 'x-amz-transcribe-language-code': 'en-US',
 'x-amz-transcribe-media-encoding': 'pcm',
 'x-amz-transcribe-sample-rate': 44100
);
req.on('response', (headers, flags) => 
 for (const name in headers) 
 console.log(`$name: $headers[name]`);
 
);
let data = '';
req.on('data', (chunk) => data += chunk; );
req.on('end', () => 
 console.log(`n$data`);
 client.close();
);
req.end();
Can anyone point out what I am missing here. I couldn't find any examples implementing this with HTTP/2 either.
Update:
 Changing the Content-type to application/json came back with response status 200 but with following exception:
`"Output":"__type":"com.amazon.coral.service#SerializationException","Version":"1.0"`
node.js amazon-web-services aws-transcribe
|
show 3 more comments
I am trying to use Amazon Transcribe Streaming Service with a http2 request from Node.js, Here is the documentation links that I am following
Streaming request format. According to this document end point is https://transcribe-streaming.<'region'>.amazonaws.com, but making a request to this url gives url not found error.
But in the Java Example found end point as https://transcribestreaming.''.amazonaws.com, so making a request to this url does not give any error or response back. I am trying from us-east-1 region.
Here is the code I am trying with.
const http2 = require('http2');
var aws4 = require('aws4');
var opts = 
 service: 'transcribe', 
 region: 'us-east-1', 
 path: '/stream-transcription', 
 headers:
 'content-type': 'application/json',
 'x-amz-target': 'com.amazonaws.transcribe.Transcribe.StartStreamTranscription'
 
var urlObj = aws4.sign(opts, accessKeyId: '<access key>', secretAccessKey: '<aws secret>');
client.on('error', function(err)
 console.error("error in request ",err);
);
const req = client.request(
 ':method': 'POST',
 ':path': '/stream-transcription',
 'authorization': urlObj.headers.Authorization, 
 'content-type': 'application/json',
 'x-amz-content-sha256': 'STREAMING-AWS4-HMAC-SHA256-EVENTS',
 'x-amz-target': 'com.amazonaws.transcribe.Transcribe.StartStreamTranscription',
 'x-amz-date': urlObj['headers']['X-Amz-Date'],
 'x-amz-transcribe-language-code': 'en-US',
 'x-amz-transcribe-media-encoding': 'pcm',
 'x-amz-transcribe-sample-rate': 44100
);
req.on('response', (headers, flags) => 
 for (const name in headers) 
 console.log(`$name: $headers[name]`);
 
);
let data = '';
req.on('data', (chunk) => data += chunk; );
req.on('end', () => 
 console.log(`n$data`);
 client.close();
);
req.end();
Can anyone point out what I am missing here. I couldn't find any examples implementing this with HTTP/2 either.
Update:
 Changing the Content-type to application/json came back with response status 200 but with following exception:
`"Output":"__type":"com.amazon.coral.service#SerializationException","Version":"1.0"`
node.js amazon-web-services aws-transcribe
 
 
 
 
 
 
 
 Were you ever able to get this to work? I am in a similar situation. Thanks!
 
 – stephen lizcano
 Mar 11 at 12:59
 
 
 
 
 
 
 
 
 
 
 Nope, still stuck on the same issue.
 
 – Manoj
 Mar 11 at 13:58
 
 
 
 
 
 
 
 
 
 
 There is also older documentation for the streaming transcription, which has the correct host but bad- content-type:D docs.aws.amazon.com/transcribe/latest/dg/… I am fighting this same API in Go and I was able to get past the initial connection and IAM authentication here stackoverflow.com/questions/53743785/… Not fully working yet though.
 
 – shelll
 Mar 13 at 14:55
 
 
 
 
 
 
 
 
 
 
 Removing/not setting the- content-typeshould help a bit. In my case setting the correct- content-typereturn HTTP 404. I am stuck after that though.
 
 – shelll
 Mar 13 at 15:40
 
 
 
 
 
 
 
 
 
 
 Yup, setting content-type:application/json returned the response with status 200 but with exception "Output":"__type":"com.amazon.coral.service#SerializationException","Version":"1.0"; but if content-type is not provided it gives a 403.
 
 – Manoj
 Mar 13 at 21:33
 
 
 
 
|
show 3 more comments
I am trying to use Amazon Transcribe Streaming Service with a http2 request from Node.js, Here is the documentation links that I am following
Streaming request format. According to this document end point is https://transcribe-streaming.<'region'>.amazonaws.com, but making a request to this url gives url not found error.
But in the Java Example found end point as https://transcribestreaming.''.amazonaws.com, so making a request to this url does not give any error or response back. I am trying from us-east-1 region.
Here is the code I am trying with.
const http2 = require('http2');
var aws4 = require('aws4');
var opts = 
 service: 'transcribe', 
 region: 'us-east-1', 
 path: '/stream-transcription', 
 headers:
 'content-type': 'application/json',
 'x-amz-target': 'com.amazonaws.transcribe.Transcribe.StartStreamTranscription'
 
var urlObj = aws4.sign(opts, accessKeyId: '<access key>', secretAccessKey: '<aws secret>');
client.on('error', function(err)
 console.error("error in request ",err);
);
const req = client.request(
 ':method': 'POST',
 ':path': '/stream-transcription',
 'authorization': urlObj.headers.Authorization, 
 'content-type': 'application/json',
 'x-amz-content-sha256': 'STREAMING-AWS4-HMAC-SHA256-EVENTS',
 'x-amz-target': 'com.amazonaws.transcribe.Transcribe.StartStreamTranscription',
 'x-amz-date': urlObj['headers']['X-Amz-Date'],
 'x-amz-transcribe-language-code': 'en-US',
 'x-amz-transcribe-media-encoding': 'pcm',
 'x-amz-transcribe-sample-rate': 44100
);
req.on('response', (headers, flags) => 
 for (const name in headers) 
 console.log(`$name: $headers[name]`);
 
);
let data = '';
req.on('data', (chunk) => data += chunk; );
req.on('end', () => 
 console.log(`n$data`);
 client.close();
);
req.end();
Can anyone point out what I am missing here. I couldn't find any examples implementing this with HTTP/2 either.
Update:
 Changing the Content-type to application/json came back with response status 200 but with following exception:
`"Output":"__type":"com.amazon.coral.service#SerializationException","Version":"1.0"`
node.js amazon-web-services aws-transcribe
I am trying to use Amazon Transcribe Streaming Service with a http2 request from Node.js, Here is the documentation links that I am following
Streaming request format. According to this document end point is https://transcribe-streaming.<'region'>.amazonaws.com, but making a request to this url gives url not found error.
But in the Java Example found end point as https://transcribestreaming.''.amazonaws.com, so making a request to this url does not give any error or response back. I am trying from us-east-1 region.
Here is the code I am trying with.
const http2 = require('http2');
var aws4 = require('aws4');
var opts = 
 service: 'transcribe', 
 region: 'us-east-1', 
 path: '/stream-transcription', 
 headers:
 'content-type': 'application/json',
 'x-amz-target': 'com.amazonaws.transcribe.Transcribe.StartStreamTranscription'
 
var urlObj = aws4.sign(opts, accessKeyId: '<access key>', secretAccessKey: '<aws secret>');
client.on('error', function(err)
 console.error("error in request ",err);
);
const req = client.request(
 ':method': 'POST',
 ':path': '/stream-transcription',
 'authorization': urlObj.headers.Authorization, 
 'content-type': 'application/json',
 'x-amz-content-sha256': 'STREAMING-AWS4-HMAC-SHA256-EVENTS',
 'x-amz-target': 'com.amazonaws.transcribe.Transcribe.StartStreamTranscription',
 'x-amz-date': urlObj['headers']['X-Amz-Date'],
 'x-amz-transcribe-language-code': 'en-US',
 'x-amz-transcribe-media-encoding': 'pcm',
 'x-amz-transcribe-sample-rate': 44100
);
req.on('response', (headers, flags) => 
 for (const name in headers) 
 console.log(`$name: $headers[name]`);
 
);
let data = '';
req.on('data', (chunk) => data += chunk; );
req.on('end', () => 
 console.log(`n$data`);
 client.close();
);
req.end();
Can anyone point out what I am missing here. I couldn't find any examples implementing this with HTTP/2 either.
Update:
 Changing the Content-type to application/json came back with response status 200 but with following exception:
`"Output":"__type":"com.amazon.coral.service#SerializationException","Version":"1.0"`
node.js amazon-web-services aws-transcribe
node.js amazon-web-services aws-transcribe
edited Mar 13 at 21:36
Manoj
asked Mar 9 at 1:06
ManojManoj
13810
13810
 
 
 
 
 
 
 
 Were you ever able to get this to work? I am in a similar situation. Thanks!
 
 – stephen lizcano
 Mar 11 at 12:59
 
 
 
 
 
 
 
 
 
 
 Nope, still stuck on the same issue.
 
 – Manoj
 Mar 11 at 13:58
 
 
 
 
 
 
 
 
 
 
 There is also older documentation for the streaming transcription, which has the correct host but bad- content-type:D docs.aws.amazon.com/transcribe/latest/dg/… I am fighting this same API in Go and I was able to get past the initial connection and IAM authentication here stackoverflow.com/questions/53743785/… Not fully working yet though.
 
 – shelll
 Mar 13 at 14:55
 
 
 
 
 
 
 
 
 
 
 Removing/not setting the- content-typeshould help a bit. In my case setting the correct- content-typereturn HTTP 404. I am stuck after that though.
 
 – shelll
 Mar 13 at 15:40
 
 
 
 
 
 
 
 
 
 
 Yup, setting content-type:application/json returned the response with status 200 but with exception "Output":"__type":"com.amazon.coral.service#SerializationException","Version":"1.0"; but if content-type is not provided it gives a 403.
 
 – Manoj
 Mar 13 at 21:33
 
 
 
 
|
show 3 more comments
 
 
 
 
 
 
 
 Were you ever able to get this to work? I am in a similar situation. Thanks!
 
 – stephen lizcano
 Mar 11 at 12:59
 
 
 
 
 
 
 
 
 
 
 Nope, still stuck on the same issue.
 
 – Manoj
 Mar 11 at 13:58
 
 
 
 
 
 
 
 
 
 
 There is also older documentation for the streaming transcription, which has the correct host but bad- content-type:D docs.aws.amazon.com/transcribe/latest/dg/… I am fighting this same API in Go and I was able to get past the initial connection and IAM authentication here stackoverflow.com/questions/53743785/… Not fully working yet though.
 
 – shelll
 Mar 13 at 14:55
 
 
 
 
 
 
 
 
 
 
 Removing/not setting the- content-typeshould help a bit. In my case setting the correct- content-typereturn HTTP 404. I am stuck after that though.
 
 – shelll
 Mar 13 at 15:40
 
 
 
 
 
 
 
 
 
 
 Yup, setting content-type:application/json returned the response with status 200 but with exception "Output":"__type":"com.amazon.coral.service#SerializationException","Version":"1.0"; but if content-type is not provided it gives a 403.
 
 – Manoj
 Mar 13 at 21:33
 
 
 
 
Were you ever able to get this to work? I am in a similar situation. Thanks!
– stephen lizcano
Mar 11 at 12:59
Were you ever able to get this to work? I am in a similar situation. Thanks!
– stephen lizcano
Mar 11 at 12:59
Nope, still stuck on the same issue.
– Manoj
Mar 11 at 13:58
Nope, still stuck on the same issue.
– Manoj
Mar 11 at 13:58
There is also older documentation for the streaming transcription, which has the correct host but bad
content-type :D docs.aws.amazon.com/transcribe/latest/dg/… I am fighting this same API in Go and I was able to get past the initial connection and IAM authentication here stackoverflow.com/questions/53743785/… Not fully working yet though.– shelll
Mar 13 at 14:55
There is also older documentation for the streaming transcription, which has the correct host but bad
content-type :D docs.aws.amazon.com/transcribe/latest/dg/… I am fighting this same API in Go and I was able to get past the initial connection and IAM authentication here stackoverflow.com/questions/53743785/… Not fully working yet though.– shelll
Mar 13 at 14:55
Removing/not setting the
content-type should help a bit. In my case setting the correct content-type return HTTP 404. I am stuck after that though.– shelll
Mar 13 at 15:40
Removing/not setting the
content-type should help a bit. In my case setting the correct content-type return HTTP 404. I am stuck after that though.– shelll
Mar 13 at 15:40
Yup, setting content-type:application/json returned the response with status 200 but with exception "Output":"__type":"com.amazon.coral.service#SerializationException","Version":"1.0"; but if content-type is not provided it gives a 403.
– Manoj
Mar 13 at 21:33
Yup, setting content-type:application/json returned the response with status 200 but with exception "Output":"__type":"com.amazon.coral.service#SerializationException","Version":"1.0"; but if content-type is not provided it gives a 403.
– Manoj
Mar 13 at 21:33
|
show 3 more comments
 0
 
active
oldest
votes
 Your Answer
 
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55073003%2famazon-transcribe-streaming-service-request-in-node-js-with-http-2-gives-no-resp%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
 0
 
active
oldest
votes
 0
 
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55073003%2famazon-transcribe-streaming-service-request-in-node-js-with-http-2-gives-no-resp%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Were you ever able to get this to work? I am in a similar situation. Thanks!
– stephen lizcano
Mar 11 at 12:59
Nope, still stuck on the same issue.
– Manoj
Mar 11 at 13:58
There is also older documentation for the streaming transcription, which has the correct host but bad
content-type:D docs.aws.amazon.com/transcribe/latest/dg/… I am fighting this same API in Go and I was able to get past the initial connection and IAM authentication here stackoverflow.com/questions/53743785/… Not fully working yet though.– shelll
Mar 13 at 14:55
Removing/not setting the
content-typeshould help a bit. In my case setting the correctcontent-typereturn HTTP 404. I am stuck after that though.– shelll
Mar 13 at 15:40
Yup, setting content-type:application/json returned the response with status 200 but with exception "Output":"__type":"com.amazon.coral.service#SerializationException","Version":"1.0"; but if content-type is not provided it gives a 403.
– Manoj
Mar 13 at 21:33