var AWS = require('aws-sdk');
AWS.config.update({region:'us-west-2',
accessKeyId: 'key',
secretAccessKey: 'key'});
var transcribeservice = new AWS.TranscribeService({apiVersion: '2017-10-26'});
var params = {
LanguageCode: 'en-US', /* required */
Media: { /* required */
MediaFileUri: 'https://s3-us-west-2.amazonaws.com/randhunt-transcribe-demos/test.flac'
},
MediaFormat: 'flac', /* required */
TranscriptionJobName: 'RandallTest1', /* required */
MediaSampleRateHertz: 44100,
// Settings: {
// MaxSpeakerLabels: 0,
// ShowSpeakerLabels: true || false,
// VocabularyName: 'STRING_VALUE'
// }
};
transcribeservice.startTranscriptionJob(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
// var transcribeservice = new AWS.TranscribeService();
// transcribeservice.createVocabulary(params, function (err, data) {
// if (err) console.log(err, err.stack); // an error occurred
// else console.log(data); // successful response
// });
// transcribeservice.startTranscriptionJob(params, function(err, data) {
// if (err) console.log(err, err.stack); // an error occurred
// else console.log(data); // successful response
// });
Comments
Post a Comment