i have this problem
"TypeError: AWS.transcribeService is not a constructor" when i try to create a object
var transcribeservice = new AWS.transcribeService({apiVersion: '2017-10-26'});
i use this lib
Thank you very much in advance!
@portacha
The current version of the SDK is 2.354.0
Can you try using this instead?
Same error ( Uncaught TypeError: AWS.TranscribeService is not a constructor) i dont know if i doing something wrong i use that now : https://sdk.amazonaws.com/js/aws-sdk-2.354.0.min.js and bower.
This is my code:
`AWS.config.update({
region: *,
credentials: new AWS.CognitoIdentityCredentials({
IdentityPoolId: *
})
});
var transcribeservice = new AWS.TranscribeService();
function transcriber(){
transcribeservice.startTranscriptionJob({
LanguageCode: 'es-US',
Media: {
MediaFileUri: 'https://s3.amazonaws.com/**/output.wav'
},
MediaFormat: 'wav',
TranscriptionJobName: 'transcrpcion1',
}, function(err, data) {
if (err) console.log(err, err.stack);
else console.log(data);
});
}`
tnx again
Caused by TranscribeService being omitted from browser_default.js?
@jstewmon is correct. The TranscribeService does not support CORS (see metadata.json), which is why it is not included in the default browser package.
T_T . Any suggestions to solve this ?. Do I have to use a server-side language? Can I use node? or what language do you recommend to use the api of aws in frontend?
@portacha
Yes, you will have to use the TranscribeService outside of the browser to get this to work. You could use Node and do this server-side, or you could also use Lambda to make those calls instead.
thank you very much
@portacha You can still do this though:
import TranscribeService from "aws-sdk/clients/transcribeservice";
See https://github.com/aws/aws-sdk-js#in-nodejs-1
Is there any plan to include CORS support and allow this to be used? Thanks, Gregg
@SodaGremlin
The Transcribe Service can best answer if/when CORS support is planned. You can engage the Transcribe Service through the AWS Developer Forums to provide the feedback that you would like to see that feature.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Most helpful comment
@jstewmon is correct. The TranscribeService does not support CORS (see metadata.json), which is why it is not included in the default browser package.