Amazon Transcribe Streaming service request in Node.js with Http/2 gives no responseAmazon 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?
How can I prevent hyper evolved versions of regular creatures from wiping out their cousins?
Modeling an IP Address
How can I make my BBEG immortal short of making them a Lich or Vampire?
Cross compiling for RPi - error while loading shared libraries
What does the "remote control" for a QF-4 look like?
How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?
LWC SFDX source push error TypeError: LWC1009: decl.moveTo is not a function
Replacing matching entries in one column of a file by another column from a different file
Do I have a twin with permutated remainders?
What defenses are there against being summoned by the Gate spell?
How is it possible to have an ability score that is less than 3?
Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)
Why is consensus so controversial in Britain?
What's the point of deactivating Num Lock on login screens?
Theorems that impeded progress
I'm flying to France today and my passport expires in less than 2 months
Can a Cauchy sequence converge for one metric while not converging for another?
Book with a girl whose grandma is a phoenix, cover depicts the emerald/green-eyed blonde girl
Why can't I see bouncing of a switch on an oscilloscope?
NMaximize is not converging to a solution
What's that red-plus icon near a text?
Alternative to sending password over mail?
High voltage LED indicator 40-1000 VDC without additional power supply
Why is Minecraft giving an OpenGL error?
Amazon Transcribe Streaming service request in Node.js with Http/2 gives no response
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 badcontent-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 thecontent-type
should help a bit. In my case setting the correctcontent-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
|
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
12310
12310
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 badcontent-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 thecontent-type
should help a bit. In my case setting the correctcontent-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
|
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 badcontent-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 thecontent-type
should help a bit. In my case setting the correctcontent-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
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-type
should help a bit. In my case setting the correctcontent-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