Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-transcribe-streaming

Package Overview
Dependencies
Maintainers
7
Versions
422
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-transcribe-streaming - npm Package Compare versions

Comparing version 3.42.0 to 3.43.0

8

dist-cjs/models/models_0.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StartStreamTranscriptionResponse = exports.TranscriptResultStream = exports.TranscriptEvent = exports.Transcript = exports.StartStreamTranscriptionRequest = exports.VocabularyFilterMethod = exports.StartMedicalStreamTranscriptionResponse = exports.StartMedicalStreamTranscriptionRequest = exports.Type = exports.Specialty = exports.Result = exports.PartialResultsStability = exports.MedicalTranscriptResultStream = exports.ServiceUnavailableException = exports.MedicalTranscriptEvent = exports.MedicalTranscript = exports.MedicalResult = exports.MedicalContentIdentificationType = exports.MedicalAlternative = exports.MedicalItem = exports.MedicalEntity = exports.MediaEncoding = exports.LimitExceededException = exports.LanguageCode = exports.InternalFailureException = exports.ContentRedactionType = exports.ContentIdentificationType = exports.ConflictException = exports.BadRequestException = exports.AudioStream = exports.AudioEvent = exports.Alternative = exports.Item = exports.ItemType = exports.Entity = void 0;
exports.StartStreamTranscriptionResponse = exports.TranscriptResultStream = exports.TranscriptEvent = exports.Transcript = exports.StartStreamTranscriptionRequest = exports.VocabularyFilterMethod = exports.StartMedicalStreamTranscriptionResponse = exports.StartMedicalStreamTranscriptionRequest = exports.Type = exports.Specialty = exports.Result = exports.PartialResultsStability = exports.MedicalTranscriptResultStream = exports.ServiceUnavailableException = exports.MedicalTranscriptEvent = exports.MedicalTranscript = exports.MedicalResult = exports.MedicalContentIdentificationType = exports.MedicalAlternative = exports.MedicalItem = exports.MedicalEntity = exports.MediaEncoding = exports.LimitExceededException = exports.LanguageWithScore = exports.LanguageCode = exports.InternalFailureException = exports.ContentRedactionType = exports.ContentIdentificationType = exports.ConflictException = exports.BadRequestException = exports.AudioStream = exports.AudioEvent = exports.Alternative = exports.Item = exports.ItemType = exports.Entity = void 0;
var Entity;

@@ -88,2 +88,8 @@ (function (Entity) {

})(LanguageCode = exports.LanguageCode || (exports.LanguageCode = {}));
var LanguageWithScore;
(function (LanguageWithScore) {
LanguageWithScore.filterSensitiveLog = (obj) => ({
...obj,
});
})(LanguageWithScore = exports.LanguageWithScore || (exports.LanguageWithScore = {}));
var LimitExceededException;

@@ -90,0 +96,0 @@ (function (LimitExceededException) {

@@ -95,2 +95,11 @@ "use strict";

}),
...(isSerializableHeaderValue(input.IdentifyLanguage) && {
"x-amzn-transcribe-identify-language": input.IdentifyLanguage.toString(),
}),
...(isSerializableHeaderValue(input.LanguageOptions) && {
"x-amzn-transcribe-language-options": input.LanguageOptions,
}),
...(isSerializableHeaderValue(input.PreferredLanguage) && {
"x-amzn-transcribe-preferred-language": input.PreferredLanguage,
}),
};

@@ -263,4 +272,6 @@ const resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/stream-transcription";

EnablePartialResultsStabilization: undefined,
IdentifyLanguage: undefined,
LanguageCode: undefined,
LanguageModelName: undefined,
LanguageOptions: undefined,
MediaEncoding: undefined,

@@ -271,2 +282,3 @@ MediaSampleRateHertz: undefined,

PiiEntityTypes: undefined,
PreferredLanguage: undefined,
RequestId: undefined,

@@ -331,2 +343,11 @@ SessionId: undefined,

}
if (output.headers["x-amzn-transcribe-identify-language"] !== undefined) {
contents.IdentifyLanguage = smithy_client_1.parseBoolean(output.headers["x-amzn-transcribe-identify-language"]);
}
if (output.headers["x-amzn-transcribe-language-options"] !== undefined) {
contents.LanguageOptions = output.headers["x-amzn-transcribe-language-options"];
}
if (output.headers["x-amzn-transcribe-preferred-language"] !== undefined) {
contents.PreferredLanguage = output.headers["x-amzn-transcribe-preferred-language"];
}
const data = context.eventStreamMarshaller.deserialize(output.body, async (event) => {

@@ -707,2 +728,18 @@ const eventName = Object.keys(event)[0];

};
const deserializeAws_restJson1LanguageIdentification = (output, context) => {
return (output || [])
.filter((e) => e != null)
.map((entry) => {
if (entry === null) {
return null;
}
return deserializeAws_restJson1LanguageWithScore(entry, context);
});
};
const deserializeAws_restJson1LanguageWithScore = (output, context) => {
return {
LanguageCode: smithy_client_1.expectString(output.LanguageCode),
Score: smithy_client_1.limitedParseDouble(output.Score),
};
};
const deserializeAws_restJson1LimitExceededException = (output, context) => {

@@ -850,2 +887,6 @@ return {

IsPartial: smithy_client_1.expectBoolean(output.IsPartial),
LanguageCode: smithy_client_1.expectString(output.LanguageCode),
LanguageIdentification: output.LanguageIdentification !== undefined && output.LanguageIdentification !== null
? deserializeAws_restJson1LanguageIdentification(output.LanguageIdentification, context)
: undefined,
ResultId: smithy_client_1.expectString(output.ResultId),

@@ -852,0 +893,0 @@ StartTime: smithy_client_1.limitedParseDouble(output.StartTime),

@@ -73,2 +73,6 @@ import { __assign } from "tslib";

})(LanguageCode || (LanguageCode = {}));
export var LanguageWithScore;
(function (LanguageWithScore) {
LanguageWithScore.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
})(LanguageWithScore || (LanguageWithScore = {}));
export var LimitExceededException;

@@ -75,0 +79,0 @@ (function (LimitExceededException) {

@@ -50,3 +50,3 @@ import { __assign, __awaiter, __generator } from "tslib";

_a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
headers = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (isSerializableHeaderValue(input.LanguageCode) && { "x-amzn-transcribe-language-code": input.LanguageCode })), (isSerializableHeaderValue(input.MediaSampleRateHertz) && {
headers = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (isSerializableHeaderValue(input.LanguageCode) && { "x-amzn-transcribe-language-code": input.LanguageCode })), (isSerializableHeaderValue(input.MediaSampleRateHertz) && {
"x-amzn-transcribe-sample-rate": input.MediaSampleRateHertz.toString(),

@@ -77,2 +77,8 @@ })), (isSerializableHeaderValue(input.MediaEncoding) && { "x-amzn-transcribe-media-encoding": input.MediaEncoding })), (isSerializableHeaderValue(input.VocabularyName) && {

"x-amzn-transcribe-language-model-name": input.LanguageModelName,
})), (isSerializableHeaderValue(input.IdentifyLanguage) && {
"x-amzn-transcribe-identify-language": input.IdentifyLanguage.toString(),
})), (isSerializableHeaderValue(input.LanguageOptions) && {
"x-amzn-transcribe-language-options": input.LanguageOptions,
})), (isSerializableHeaderValue(input.PreferredLanguage) && {
"x-amzn-transcribe-preferred-language": input.PreferredLanguage,
}));

@@ -264,4 +270,6 @@ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/stream-transcription";

EnablePartialResultsStabilization: undefined,
IdentifyLanguage: undefined,
LanguageCode: undefined,
LanguageModelName: undefined,
LanguageOptions: undefined,
MediaEncoding: undefined,

@@ -272,2 +280,3 @@ MediaSampleRateHertz: undefined,

PiiEntityTypes: undefined,
PreferredLanguage: undefined,
RequestId: undefined,

@@ -332,2 +341,11 @@ SessionId: undefined,

}
if (output.headers["x-amzn-transcribe-identify-language"] !== undefined) {
contents.IdentifyLanguage = __parseBoolean(output.headers["x-amzn-transcribe-identify-language"]);
}
if (output.headers["x-amzn-transcribe-language-options"] !== undefined) {
contents.LanguageOptions = output.headers["x-amzn-transcribe-language-options"];
}
if (output.headers["x-amzn-transcribe-preferred-language"] !== undefined) {
contents.PreferredLanguage = output.headers["x-amzn-transcribe-preferred-language"];
}
data = context.eventStreamMarshaller.deserialize(output.body, function (event) { return __awaiter(void 0, void 0, void 0, function () {

@@ -806,2 +824,18 @@ var eventName, eventHeaders, eventMessage, parsedEvent;

};
var deserializeAws_restJson1LanguageIdentification = function (output, context) {
return (output || [])
.filter(function (e) { return e != null; })
.map(function (entry) {
if (entry === null) {
return null;
}
return deserializeAws_restJson1LanguageWithScore(entry, context);
});
};
var deserializeAws_restJson1LanguageWithScore = function (output, context) {
return {
LanguageCode: __expectString(output.LanguageCode),
Score: __limitedParseDouble(output.Score),
};
};
var deserializeAws_restJson1LimitExceededException = function (output, context) {

@@ -949,2 +983,6 @@ return {

IsPartial: __expectBoolean(output.IsPartial),
LanguageCode: __expectString(output.LanguageCode),
LanguageIdentification: output.LanguageIdentification !== undefined && output.LanguageIdentification !== null
? deserializeAws_restJson1LanguageIdentification(output.LanguageIdentification, context)
: undefined,
ResultId: __expectString(output.ResultId),

@@ -951,0 +989,0 @@ StartTime: __limitedParseDouble(output.StartTime),

156

dist-types/models/models_0.d.ts

@@ -15,3 +15,3 @@ import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";

/**
* <p>The category of of information identified in this entity; for example, PII.</p>
* <p>The category of information identified in this entity; for example, PII.</p>
*/

@@ -57,5 +57,5 @@ Category?: string;

/**
* <p>The type of the item. <code>PRONUNCIATION</code> indicates that the item is a word that
* was recognized in the input audio. <code>PUNCTUATION</code> indicates that the item was
* interpreted as a pause in the input audio.</p>
* <p>The type of the item. <code>PRONUNCIATION</code> indicates that the item is a word
* that was recognized in the input audio. <code>PUNCTUATION</code> indicates that the item
* was interpreted as a pause in the input audio.</p>
*/

@@ -69,3 +69,3 @@ Type?: ItemType | string;

* <p>Indicates whether a word in the item matches a word in the vocabulary filter you've chosen
* for your real-time stream. If <code>true</code> then a word in the item matches your
* for your media stream. If <code>true</code> then a word in the item matches your
* vocabulary filter.</p>

@@ -75,3 +75,3 @@ */

/**
* <p>If speaker identification is enabled, shows the speakers identified in the real-time
* <p>If speaker identification is enabled, shows the speakers identified in the media
* stream.</p>

@@ -81,3 +81,3 @@ */

/**
* <p>A value between 0 and 1 for an item that is a confidence score that Amazon Transcribe assigns to each
* <p>A value between zero and one for an item that is a confidence score that Amazon Transcribe assigns to each
* word or phrase that it transcribes.</p>

@@ -240,2 +240,25 @@ */

/**
* <p>The language codes of the identified languages and their associated confidence scores.
* The confidence score is a value between zero and one; a larger value indicates a higher
* confidence in the identified language.</p>
*/
export interface LanguageWithScore {
/**
* <p>The language code of the language identified by Amazon Transcribe.</p>
*/
LanguageCode?: LanguageCode | string;
/**
* <p>The confidence score for the associated language code. Confidence scores are values
* between zero and one; larger values indicate a higher confidence in the identified language.
* </p>
*/
Score?: number;
}
export declare namespace LanguageWithScore {
/**
* @internal
*/
const filterSensitiveLog: (obj: LanguageWithScore) => any;
}
/**
* <p>You have exceeded the maximum number of concurrent transcription streams, are starting

@@ -608,3 +631,3 @@ * transcription streams too quickly, or the maximum audio length of 4 hours. Wait until a stream

* <p>A list of possible transcriptions for the audio. Each alternative typically contains one
* <code>item</code> that contains the result of the transcription.</p>
* <code>item</code> that contains the result of the transcription.</p>
*/

@@ -619,2 +642,10 @@ Alternatives?: Alternative[];

ChannelId?: string;
/**
* <p>The language code of the identified language in your media stream.</p>
*/
LanguageCode?: LanguageCode | string;
/**
* <p>The language code of the dominant language identified in your media.</p>
*/
LanguageIdentification?: LanguageWithScore[];
}

@@ -778,8 +809,8 @@ export declare namespace Result {

/**
* <p>Indicates the source language used in the input audio stream.</p>
* <p>The language code of the input audio stream.</p>
*/
LanguageCode: LanguageCode | string | undefined;
LanguageCode?: LanguageCode | string;
/**
* <p>The sample rate, in Hertz, of the input audio. We suggest that you use 8,000 Hz for low
* quality audio and 16,000 Hz for high quality audio.</p>
* <p>The sample rate, in Hertz (Hz), of the input audio. We suggest that you use 8,000 Hz
* for low quality audio and 16,000 Hz or higher for high quality audio.</p>
*/

@@ -813,20 +844,20 @@ MediaSampleRateHertz: number | undefined;

* <p>The manner in which you use your vocabulary filter to filter words in your transcript.
* <code>Remove</code> removes filtered words from your transcription results.
* <code>Mask</code> masks filtered words with a <code>***</code> in your transcription results.
* <code>Tag</code> keeps the filtered words in your transcription results and tags them. The
* tag appears as <code>VocabularyFilterMatch</code> equal to <code>True</code>
* </p>
* <code>Remove</code> removes filtered words from your transcription results.
* <code>Mask</code> masks filtered words with a <code>***</code> in your transcription
* results. <code>Tag</code> keeps the filtered words in your transcription results and tags
* them. The tag appears as <code>VocabularyFilterMatch</code> equal to
* <code>True</code>.</p>
*/
VocabularyFilterMethod?: VocabularyFilterMethod | string;
/**
* <p>When <code>true</code>, enables speaker identification in your real-time stream.</p>
* <p>When <code>true</code>, enables speaker identification in your media stream.</p>
*/
ShowSpeakerLabel?: boolean;
/**
* <p>When <code>true</code>, instructs Amazon Transcribe to process each audio channel separately and then
* merge the transcription output of each channel into a single transcription.</p>
* <p>When <code>true</code>, instructs Amazon Transcribe to process each audio channel separately,
* then merges the transcription output of each channel into a single transcription.</p>
* <p>Amazon Transcribe also produces a transcription of each item. An item includes the start time, end
* time, and any alternative transcriptions.</p>
* <p>You can't set both <code>ShowSpeakerLabel</code> and
* <code>EnableChannelIdentification</code> in the same request. If you set both, your request
* <code>EnableChannelIdentification</code> in the same request. If you set both, your request
* returns a <code>BadRequestException</code>.</p>

@@ -853,16 +884,33 @@ */

/**
* <p>Set this field to PII to identify personally identifiable information (PII) in the transcription output. Content identification is performed only upon complete transcription of the audio segments.</p>
* <p>You can’t set both <code>ContentIdentificationType</code> and <code>ContentRedactionType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
* <p>Set this field to PII to identify personally identifiable information (PII) in the transcription
* output. Content identification is performed only upon complete transcription of the audio
* segments.</p>
* <p>You can’t set both <code>ContentIdentificationType</code> and
* <code>ContentRedactionType</code> in the same request. If you set both, your request
* returns a <code>BadRequestException</code>.</p>
*/
ContentIdentificationType?: ContentIdentificationType | string;
/**
* <p>Set this field to PII to redact personally identifiable information (PII) in the transcription output. Content redaction is performed only upon complete transcription of the audio segments.</p>
* <p>You can’t set both <code>ContentRedactionType</code> and <code>ContentIdentificationType</code> in the same request. If you set both, your request returns a <code>BadRequestException</code>.</p>
* <p>Set this field to PII to redact personally identifiable information (PII) in the transcription
* output. Content redaction is performed only upon complete transcription of the audio
* segments.</p>
* <p>You can’t set both <code>ContentRedactionType</code> and
* <code>ContentIdentificationType</code> in the same request. If you set both, your request
* returns a <code>BadRequestException</code>.</p>
*/
ContentRedactionType?: ContentRedactionType | string;
/**
* <p>List the PII entity types you want to identify or redact. In order to specify entity types, you must have
* either <code>ContentIdentificationType</code> or <code>ContentRedactionType</code> enabled.</p>
* <p>List the PII entity types you want to identify or redact. In order to specify entity types,
* you must have either <code>ContentIdentificationType</code> or
* <code>ContentRedactionType</code> enabled.</p>
* <p>
* <code>PiiEntityTypes</code> is an optional parameter with a default value of <code>ALL</code>.</p>
* <code>PIIEntityTypes</code> must be comma-separated; the available values are:
* <code>BANK_ACCOUNT_NUMBER</code>, <code>BANK_ROUTING</code>,
* <code>CREDIT_DEBIT_NUMBER</code>, <code>CREDIT_DEBIT_CVV</code>,
* <code>CREDIT_DEBIT_EXPIRY</code>, <code>PIN</code>, <code>EMAIL</code>,
* <code>ADDRESS</code>, <code>NAME</code>, <code>PHONE</code>,
* <code>SSN</code>, and <code>ALL</code>.</p>
* <p>
* <code>PiiEntityTypes</code> is an optional parameter with a default value of
* <code>ALL</code>.</p>
*/

@@ -874,2 +922,25 @@ PiiEntityTypes?: string;

LanguageModelName?: string;
/**
* <p>Optional. Set this value to <code>true</code> to enable language identification for
* your media stream.</p>
*/
IdentifyLanguage?: boolean;
/**
* <p>An object containing a list of languages that might be present in your audio.</p>
* <p>You must provide two or more language codes to help Amazon Transcribe identify the correct
* language of your media stream with the highest possible accuracy. You can only select one
* variant per language; for example, you can't include both <code>en-US</code> and
* <code>en-UK</code> in the same request.</p>
* <p>You can only use this parameter if you've set <code>IdentifyLanguage</code> to
* <code>true</code>in your request.</p>
*/
LanguageOptions?: string;
/**
* <p>Optional. From the subset of languages codes you provided for
* <code>LanguageOptions</code>, you can select one preferred language for your
* transcription.</p>
* <p>You can only use this parameter if you've set <code>IdentifyLanguage</code> to
* <code>true</code>in your request.</p>
*/
PreferredLanguage?: LanguageCode | string;
}

@@ -924,4 +995,3 @@ export declare namespace StartStreamTranscriptionRequest {

* Amazon Transcribe to your application. The event can be a partial transcription of a section of the audio
* stream, or it can be the entire transcription of that portion of the audio stream.
* </p>
* stream, or it can be the entire transcription of that portion of the audio stream. </p>
*/

@@ -1030,8 +1100,8 @@ interface TranscriptEventMember {

/**
* <p>The language code for the input audio stream.</p>
* <p>The language code of the input audio stream.</p>
*/
LanguageCode?: LanguageCode | string;
/**
* <p>The sample rate for the input audio stream. Use 8,000 Hz for low quality audio and 16,000 Hz
* for high quality audio.</p>
* <p>The sample rate, in Hertz (Hz), for the input audio stream. Use 8,000 Hz for low quality
* audio and 16,000 Hz or higher for high quality audio.</p>
*/

@@ -1056,7 +1126,7 @@ MediaSampleRateHertz?: number;

/**
* <p>The name of the vocabulary filter used in your real-time stream.</p>
* <p>The name of the vocabulary filter used in your media stream.</p>
*/
VocabularyFilterName?: string;
/**
* <p>The vocabulary filtering method used in the real-time stream.</p>
* <p>The vocabulary filtering method used in the media stream.</p>
*/

@@ -1097,3 +1167,19 @@ VocabularyFilterMethod?: VocabularyFilterMethod | string;

PiiEntityTypes?: string;
/**
* <p>The name of the language model used in your media stream.</p>
*/
LanguageModelName?: string;
/**
* <p>The language code of the language identified in your media stream.</p>
*/
IdentifyLanguage?: boolean;
/**
* <p>The language codes used in the identification of your media stream's predominant
* language.</p>
*/
LanguageOptions?: string;
/**
* <p>The preferred language you specified in your request.</p>
*/
PreferredLanguage?: LanguageCode | string;
}

@@ -1100,0 +1186,0 @@ export declare namespace StartStreamTranscriptionResponse {

@@ -144,2 +144,13 @@ import { MetadataBearer as $MetadataBearer, SmithyException as __SmithyException } from "@aws-sdk/types";

export interface LanguageWithScore {
LanguageCode?: LanguageCode | string;
Score?: number;
}
export declare namespace LanguageWithScore {
const filterSensitiveLog: (obj: LanguageWithScore) => any;
}
export interface LimitExceededException extends __SmithyException, $MetadataBearer {

@@ -365,2 +376,6 @@ name: "LimitExceededException";

ChannelId?: string;
LanguageCode?: LanguageCode | string;
LanguageIdentification?: LanguageWithScore[];
}

@@ -452,3 +467,3 @@ export declare namespace Result {

LanguageCode: LanguageCode | string | undefined;
LanguageCode?: LanguageCode | string;

@@ -486,2 +501,8 @@ MediaSampleRateHertz: number | undefined;

LanguageModelName?: string;
IdentifyLanguage?: boolean;
LanguageOptions?: string;
PreferredLanguage?: LanguageCode | string;
}

@@ -633,3 +654,10 @@ export declare namespace StartStreamTranscriptionRequest {

PiiEntityTypes?: string;
LanguageModelName?: string;
IdentifyLanguage?: boolean;
LanguageOptions?: string;
PreferredLanguage?: LanguageCode | string;
}

@@ -636,0 +664,0 @@ export declare namespace StartStreamTranscriptionResponse {

{
"name": "@aws-sdk/client-transcribe-streaming",
"description": "AWS SDK for JavaScript Transcribe Streaming Client for Node.js, Browser and React Native",
"version": "3.42.0",
"version": "3.43.0",
"scripts": {

@@ -26,3 +26,3 @@ "build": "yarn build:cjs && yarn build:es && yarn build:types",

"@aws-crypto/sha256-js": "2.0.0",
"@aws-sdk/client-sts": "3.42.0",
"@aws-sdk/client-sts": "3.43.0",
"@aws-sdk/config-resolver": "3.40.0",

@@ -29,0 +29,0 @@ "@aws-sdk/credential-provider-node": "3.41.0",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc