@yandex-cloud/nodejs-sdk
Version:
Yandex.Cloud NodeJS SDK
987 lines • 172 kB
TypeScript
/// <reference types="node" />
import _m0 from "protobufjs/minimal";
export declare const protobufPackage = "speechkit.stt.v3";
export declare enum CodeType {
CODE_TYPE_UNSPECIFIED = 0,
/** WORKING - all good */
WORKING = 1,
/** WARNING - for example, if speech is sent not in real time. or unknown context (and we've made fallback). */
WARNING = 2,
/** CLOSED - after session was closed. */
CLOSED = 3,
UNRECOGNIZED = -1
}
export declare function codeTypeFromJSON(object: any): CodeType;
export declare function codeTypeToJSON(object: CodeType): string;
/** Options */
export interface TextNormalizationOptions {
$type: "speechkit.stt.v3.TextNormalizationOptions";
textNormalization: TextNormalizationOptions_TextNormalization;
/** Profanity filter (default: false). */
profanityFilter: boolean;
/** Rewrite text in literature style (default: false). */
literatureText: boolean;
/** Define phone formatting mode */
phoneFormattingMode: TextNormalizationOptions_PhoneFormattingMode;
}
/** Normalization */
export declare enum TextNormalizationOptions_TextNormalization {
TEXT_NORMALIZATION_UNSPECIFIED = 0,
/** TEXT_NORMALIZATION_ENABLED - Enable normalization */
TEXT_NORMALIZATION_ENABLED = 1,
/** TEXT_NORMALIZATION_DISABLED - Disable normalization */
TEXT_NORMALIZATION_DISABLED = 2,
UNRECOGNIZED = -1
}
export declare function textNormalizationOptions_TextNormalizationFromJSON(object: any): TextNormalizationOptions_TextNormalization;
export declare function textNormalizationOptions_TextNormalizationToJSON(object: TextNormalizationOptions_TextNormalization): string;
export declare enum TextNormalizationOptions_PhoneFormattingMode {
PHONE_FORMATTING_MODE_UNSPECIFIED = 0,
/** PHONE_FORMATTING_MODE_DISABLED - Disable phone formatting */
PHONE_FORMATTING_MODE_DISABLED = 1,
UNRECOGNIZED = -1
}
export declare function textNormalizationOptions_PhoneFormattingModeFromJSON(object: any): TextNormalizationOptions_PhoneFormattingMode;
export declare function textNormalizationOptions_PhoneFormattingModeToJSON(object: TextNormalizationOptions_PhoneFormattingMode): string;
export interface DefaultEouClassifier {
$type: "speechkit.stt.v3.DefaultEouClassifier";
/** EOU sensitivity. Currently two levels, faster with more error and more conservative (our default). */
type: DefaultEouClassifier_EouSensitivity;
/** Hint for max pause between words. Our EOU detector could use this information to distinguish between end of utterance and slow speech (like one <long pause> two <long pause> three, etc). */
maxPauseBetweenWordsHintMs: number;
}
export declare enum DefaultEouClassifier_EouSensitivity {
EOU_SENSITIVITY_UNSPECIFIED = 0,
DEFAULT = 1,
HIGH = 2,
UNRECOGNIZED = -1
}
export declare function defaultEouClassifier_EouSensitivityFromJSON(object: any): DefaultEouClassifier_EouSensitivity;
export declare function defaultEouClassifier_EouSensitivityToJSON(object: DefaultEouClassifier_EouSensitivity): string;
/** Use EOU provided by user */
export interface ExternalEouClassifier {
$type: "speechkit.stt.v3.ExternalEouClassifier";
}
export interface EouClassifierOptions {
$type: "speechkit.stt.v3.EouClassifierOptions";
/** EOU classifier provided by SpeechKit. Default. */
defaultClassifier?: DefaultEouClassifier | undefined;
/** EOU is enforced by external messages from user. */
externalClassifier?: ExternalEouClassifier | undefined;
}
export interface RecognitionClassifier {
$type: "speechkit.stt.v3.RecognitionClassifier";
/** Classifier name */
classifier: string;
/** Describes the types of responses to which the classification results will come */
triggers: RecognitionClassifier_TriggerType[];
}
export declare enum RecognitionClassifier_TriggerType {
/** TRIGGER_TYPE_UNSPECIFIED - Do not use */
TRIGGER_TYPE_UNSPECIFIED = 0,
/** ON_UTTERANCE - Apply classifier to utterance responses */
ON_UTTERANCE = 1,
/** ON_FINAL - Apply classifier to final responses */
ON_FINAL = 2,
UNRECOGNIZED = -1
}
export declare function recognitionClassifier_TriggerTypeFromJSON(object: any): RecognitionClassifier_TriggerType;
export declare function recognitionClassifier_TriggerTypeToJSON(object: RecognitionClassifier_TriggerType): string;
export interface RecognitionClassifierOptions {
$type: "speechkit.stt.v3.RecognitionClassifierOptions";
/** List of classifiers to use */
classifiers: RecognitionClassifier[];
}
export interface SpeechAnalysisOptions {
$type: "speechkit.stt.v3.SpeechAnalysisOptions";
/** Analyse speech for every speaker */
enableSpeakerAnalysis: boolean;
/** Analyse conversation of two speakers */
enableConversationAnalysis: boolean;
/** Quantile levels in range (0, 1) for descriptive statistics */
descriptiveStatisticsQuantiles: number[];
}
/** RAW Audio format spec (no container to infer type). Used in AudioFormat options. */
export interface RawAudio {
$type: "speechkit.stt.v3.RawAudio";
/** Type of audio encoding */
audioEncoding: RawAudio_AudioEncoding;
/** PCM sample rate */
sampleRateHertz: number;
/** PCM channel count. Currently only single channel audio is supported in real-time recognition. */
audioChannelCount: number;
}
export declare enum RawAudio_AudioEncoding {
AUDIO_ENCODING_UNSPECIFIED = 0,
/** LINEAR16_PCM - Audio bit depth 16-bit signed little-endian (Linear PCM). */
LINEAR16_PCM = 1,
UNRECOGNIZED = -1
}
export declare function rawAudio_AudioEncodingFromJSON(object: any): RawAudio_AudioEncoding;
export declare function rawAudio_AudioEncodingToJSON(object: RawAudio_AudioEncoding): string;
/** Audio with fixed type in container. Used in AudioFormat options. */
export interface ContainerAudio {
$type: "speechkit.stt.v3.ContainerAudio";
/** Type of audio container. */
containerAudioType: ContainerAudio_ContainerAudioType;
}
export declare enum ContainerAudio_ContainerAudioType {
CONTAINER_AUDIO_TYPE_UNSPECIFIED = 0,
/** WAV - Audio bit depth 16-bit signed little-endian (Linear PCM). */
WAV = 1,
/** OGG_OPUS - Data is encoded using the OPUS audio codec and compressed using the OGG container format. */
OGG_OPUS = 2,
/** MP3 - Data is encoded using MPEG-1/2 Layer III and compressed using the MP3 container format. */
MP3 = 3,
UNRECOGNIZED = -1
}
export declare function containerAudio_ContainerAudioTypeFromJSON(object: any): ContainerAudio_ContainerAudioType;
export declare function containerAudio_ContainerAudioTypeToJSON(object: ContainerAudio_ContainerAudioType): string;
/** Audio format options. */
export interface AudioFormatOptions {
$type: "speechkit.stt.v3.AudioFormatOptions";
/** Audio without container. */
rawAudio?: RawAudio | undefined;
/** Audio is wrapped in container. */
containerAudio?: ContainerAudio | undefined;
}
/** Type of restriction for the list of languages expected in the incoming speech stream. */
export interface LanguageRestrictionOptions {
$type: "speechkit.stt.v3.LanguageRestrictionOptions";
/** Language restriction type */
restrictionType: LanguageRestrictionOptions_LanguageRestrictionType;
/** The list of language codes to restrict recognition in the case of an auto model */
languageCode: string[];
}
export declare enum LanguageRestrictionOptions_LanguageRestrictionType {
LANGUAGE_RESTRICTION_TYPE_UNSPECIFIED = 0,
/** WHITELIST - The allowing list. The incoming audio can contain only the listed languages. */
WHITELIST = 1,
/** BLACKLIST - The forbidding list. The incoming audio cannot contain the listed languages. */
BLACKLIST = 2,
UNRECOGNIZED = -1
}
export declare function languageRestrictionOptions_LanguageRestrictionTypeFromJSON(object: any): LanguageRestrictionOptions_LanguageRestrictionType;
export declare function languageRestrictionOptions_LanguageRestrictionTypeToJSON(object: LanguageRestrictionOptions_LanguageRestrictionType): string;
export interface RecognitionModelOptions {
$type: "speechkit.stt.v3.RecognitionModelOptions";
/**
* Sets the recognition model for the cloud version of SpeechKit. Possible values: 'general', 'general:rc', 'general:deprecated'.
* The model is ignored for SpeechKit Hybrid.
*/
model: string;
/** Specified input audio. */
audioFormat?: AudioFormatOptions;
/** Text normalization options. */
textNormalization?: TextNormalizationOptions;
/** Possible languages in audio. */
languageRestriction?: LanguageRestrictionOptions;
/** How to deal with audio data (in real time, after all data is received, etc). Default is REAL_TIME. */
audioProcessingType: RecognitionModelOptions_AudioProcessingType;
}
export declare enum RecognitionModelOptions_AudioProcessingType {
AUDIO_PROCESSING_TYPE_UNSPECIFIED = 0,
/** REAL_TIME - Process audio in mode optimized for real-time recognition, i.e. send partials and final responses as soon as possible */
REAL_TIME = 1,
/** FULL_DATA - Process audio after all data was received */
FULL_DATA = 2,
UNRECOGNIZED = -1
}
export declare function recognitionModelOptions_AudioProcessingTypeFromJSON(object: any): RecognitionModelOptions_AudioProcessingType;
export declare function recognitionModelOptions_AudioProcessingTypeToJSON(object: RecognitionModelOptions_AudioProcessingType): string;
export interface StreamingOptions {
$type: "speechkit.stt.v3.StreamingOptions";
/** Configuration for speech recognition model. */
recognitionModel?: RecognitionModelOptions;
/** Configuration for end of utterance detection model. */
eouClassifier?: EouClassifierOptions;
/** Configuration for classifiers over speech recognition. */
recognitionClassifier?: RecognitionClassifierOptions;
/** Configuration for speech analysis over speech recognition. */
speechAnalysis?: SpeechAnalysisOptions;
}
/** Data chunk with audio. */
export interface AudioChunk {
$type: "speechkit.stt.v3.AudioChunk";
/** Bytes with audio data. */
data: Buffer;
}
/** Data chunk with silence. */
export interface SilenceChunk {
$type: "speechkit.stt.v3.SilenceChunk";
/** Duration of silence chunk in ms. */
durationMs: number;
}
/** Force EOU */
export interface Eou {
$type: "speechkit.stt.v3.Eou";
}
/**
* Streaming audio request
* Events are control messages from user.
* First message should be session options.
* The next messages are audio data chunks or control messages.
*/
export interface StreamingRequest {
$type: "speechkit.stt.v3.StreamingRequest";
/** Session options. Should be the first message from user. */
sessionOptions?: StreamingOptions | undefined;
/** Chunk with audio data. */
chunk?: AudioChunk | undefined;
/** Chunk with silence. */
silenceChunk?: SilenceChunk | undefined;
/** Request to end current utterance. Works only with external EOU detector. */
eou?: Eou | undefined;
}
export interface RecognizeFileRequest {
$type: "speechkit.stt.v3.RecognizeFileRequest";
/** Bytes with data */
content: Buffer | undefined;
/** S3 data url */
uri: string | undefined;
/** Configuration for speech recognition model. */
recognitionModel?: RecognitionModelOptions;
/** Configuration for classifiers over speech recognition. */
recognitionClassifier?: RecognitionClassifierOptions;
/** Configuration for speech analysis over speech recognition. */
speechAnalysis?: SpeechAnalysisOptions;
}
/** Recognized word. */
export interface Word {
$type: "speechkit.stt.v3.Word";
/** Word text. */
text: string;
/** Estimation of word start time in ms. */
startTimeMs: number;
/** Estimation of word end time in ms. */
endTimeMs: number;
}
/** Estimation of language and its probability. */
export interface LanguageEstimation {
$type: "speechkit.stt.v3.LanguageEstimation";
/** Language code in ISO 639-1 format. */
languageCode: string;
/** Estimation of language probability. */
probability: number;
}
/** Recognition of specific time frame. */
export interface Alternative {
$type: "speechkit.stt.v3.Alternative";
/** Words in time frame. */
words: Word[];
/** Text in time frame. */
text: string;
/** Start of time frame. */
startTimeMs: number;
/** End of time frame. */
endTimeMs: number;
/** The hypothesis confidence. Currently is not used. */
confidence: number;
/** Distribution over possible languages. */
languages: LanguageEstimation[];
}
/** Update information for external End of Utterance. */
export interface EouUpdate {
$type: "speechkit.stt.v3.EouUpdate";
/** EOU estimated time. */
timeMs: number;
}
/** Update of hypothesis. */
export interface AlternativeUpdate {
$type: "speechkit.stt.v3.AlternativeUpdate";
/** List of hypothesis for timeframes. */
alternatives: Alternative[];
/** @deprecated */
channelTag: string;
}
/** AudioCursors are state of ASR recognition stream. */
export interface AudioCursors {
$type: "speechkit.stt.v3.AudioCursors";
/** Amount of audio chunks server received. This cursor is moved after each audio chunk was received by server. */
receivedDataMs: number;
/** Input stream reset data. */
resetTimeMs: number;
/**
* How much audio was processed. This time includes trimming silences as well. This cursor is moved after server received enough data
* to update recognition results (includes silence as well).
*/
partialTimeMs: number;
/**
* Time of last final. This cursor is moved when server decides that recognition from start of audio until final_time_ms will not change anymore
* usually this even is followed by EOU detection (but this could change in future).
*/
finalTimeMs: number;
/** This is index of last final server send. Incremented after each new final. */
finalIndex: number;
/**
* Estimated time of EOU. Cursor is updated after each new EOU is sent.
* For external classifier this equals to received_data_ms at the moment EOU event arrives.
* For internal classifier this is estimation of time. The time is not exact and has the same guarantees as word timings.
*/
eouTimeMs: number;
}
/** Refinement for final hypo. For example, text normalization is refinement. */
export interface FinalRefinement {
$type: "speechkit.stt.v3.FinalRefinement";
/** Index of final for which server sends additional information. */
finalIndex: number;
/** Normalized text instead of raw one. */
normalizedText?: AlternativeUpdate | undefined;
}
/** Status message */
export interface StatusCode {
$type: "speechkit.stt.v3.StatusCode";
/** Code type. */
codeType: CodeType;
/** Human readable message. */
message: string;
}
/** Session identifier. */
export interface SessionUuid {
$type: "speechkit.stt.v3.SessionUuid";
/** Internal session identifier. */
uuid: string;
/** User session identifier. */
userRequestId: string;
}
export interface PhraseHighlight {
$type: "speechkit.stt.v3.PhraseHighlight";
/** Text transcription of the highlighted audio segment */
text: string;
/** Start time of the highlighted audio segment */
startTimeMs: number;
/** End time of the highlighted audio segment */
endTimeMs: number;
}
export interface RecognitionClassifierLabel {
$type: "speechkit.stt.v3.RecognitionClassifierLabel";
/** The label of the class predicted by the classifier */
label: string;
/** The prediction confidence */
confidence: number;
}
export interface RecognitionClassifierResult {
$type: "speechkit.stt.v3.RecognitionClassifierResult";
/** Name of the triggered classifier */
classifier: string;
/** List of highlights, i.e. parts of phrase that determine the result of the classification */
highlights: PhraseHighlight[];
/** Classifier predictions */
labels: RecognitionClassifierLabel[];
}
export interface RecognitionClassifierUpdate {
$type: "speechkit.stt.v3.RecognitionClassifierUpdate";
/** Response window type */
windowType: RecognitionClassifierUpdate_WindowType;
/** Start time of the audio segment used for classification */
startTimeMs: number;
/** End time of the audio segment used for classification */
endTimeMs: number;
/** Result for dictionary-based classifier */
classifierResult?: RecognitionClassifierResult;
}
export declare enum RecognitionClassifierUpdate_WindowType {
/** WINDOW_TYPE_UNSPECIFIED - Never used */
WINDOW_TYPE_UNSPECIFIED = 0,
/** LAST_UTTERANCE - The result of applying the classifier to the last utterance response */
LAST_UTTERANCE = 1,
/** LAST_FINAL - The result of applying the classifier to the last final response */
LAST_FINAL = 2,
UNRECOGNIZED = -1
}
export declare function recognitionClassifierUpdate_WindowTypeFromJSON(object: any): RecognitionClassifierUpdate_WindowType;
export declare function recognitionClassifierUpdate_WindowTypeToJSON(object: RecognitionClassifierUpdate_WindowType): string;
export interface DescriptiveStatistics {
$type: "speechkit.stt.v3.DescriptiveStatistics";
/** Minimum observed value */
min: number;
/** Maximum observed value */
max: number;
/** Estimated mean of distribution */
mean: number;
/** Estimated standard deviation of distribution */
std: number;
/** List of evaluated quantiles */
quantiles: DescriptiveStatistics_Quantile[];
}
export interface DescriptiveStatistics_Quantile {
$type: "speechkit.stt.v3.DescriptiveStatistics.Quantile";
/** Quantile level in range (0, 1) */
level: number;
/** Quantile value */
value: number;
}
export interface AudioSegmentBoundaries {
$type: "speechkit.stt.v3.AudioSegmentBoundaries";
/** Audio segment start time */
startTimeMs: number;
/** Audio segment end time */
endTimeMs: number;
}
export interface SpeakerAnalysis {
$type: "speechkit.stt.v3.SpeakerAnalysis";
/** Speaker tag */
speakerTag: string;
/** Response window type */
windowType: SpeakerAnalysis_WindowType;
/** Audio segment boundaries */
speechBoundaries?: AudioSegmentBoundaries;
/** Total speech duration */
totalSpeechMs: number;
/** Speech ratio within audio segment */
speechRatio: number;
/** Total silence duration */
totalSilenceMs: number;
/** Silence ratio within audio segment */
silenceRatio: number;
/** Number of words in recognized speech */
wordsCount: number;
/** Number of letters in recognized speech */
lettersCount: number;
/** Descriptive statistics for words per second distribution */
wordsPerSecond?: DescriptiveStatistics;
/** Descriptive statistics for letters per second distribution */
lettersPerSecond?: DescriptiveStatistics;
/** Descriptive statistics for words per utterance distribution */
wordsPerUtterance?: DescriptiveStatistics;
/** Descriptive statistics for letters per utterance distribution */
lettersPerUtterance?: DescriptiveStatistics;
/** Number of utterances */
utteranceCount: number;
/** Descriptive statistics for utterance duration distribution */
utteranceDurationEstimation?: DescriptiveStatistics;
}
export declare enum SpeakerAnalysis_WindowType {
WINDOW_TYPE_UNSPECIFIED = 0,
/** TOTAL - Stats for all received audio */
TOTAL = 1,
/** LAST_UTTERANCE - Stats for last utterance */
LAST_UTTERANCE = 2,
UNRECOGNIZED = -1
}
export declare function speakerAnalysis_WindowTypeFromJSON(object: any): SpeakerAnalysis_WindowType;
export declare function speakerAnalysis_WindowTypeToJSON(object: SpeakerAnalysis_WindowType): string;
export interface ConversationAnalysis {
$type: "speechkit.stt.v3.ConversationAnalysis";
/** Audio segment boundaries */
conversationBoundaries?: AudioSegmentBoundaries;
/** Total simultaneous silence duration */
totalSimultaneousSilenceDurationMs: number;
/** Simultaneous silence ratio within audio segment */
totalSimultaneousSilenceRatio: number;
/** Descriptive statistics for simultaneous silence duration distribution */
simultaneousSilenceDurationEstimation?: DescriptiveStatistics;
/** Total simultaneous speech duration */
totalSimultaneousSpeechDurationMs: number;
/** Simultaneous speech ratio within audio segment */
totalSimultaneousSpeechRatio: number;
/** Descriptive statistics for simultaneous speech duration distribution */
simultaneousSpeechDurationEstimation?: DescriptiveStatistics;
/** Interrupts description for every speaker */
speakerInterrupts: ConversationAnalysis_InterruptsEvaluation[];
}
export interface ConversationAnalysis_InterruptsEvaluation {
$type: "speechkit.stt.v3.ConversationAnalysis.InterruptsEvaluation";
/** Speaker tag */
speakerTag: string;
/** Number of interrupts made by the speaker */
interruptsCount: number;
/** Total duration of all interrupts */
interruptsDurationMs: number;
/** Boundaries for every interrupt */
interrupts: AudioSegmentBoundaries[];
}
/**
* Responses from server.
* Each response contains session uuid
* AudioCursors
* plus specific event
*/
export interface StreamingResponse {
$type: "speechkit.stt.v3.StreamingResponse";
/** Session identifier */
sessionUuid?: SessionUuid;
/** Progress bar for stream session recognition: how many data we obtained; final and partial times; etc. */
audioCursors?: AudioCursors;
/** Wall clock on server side. This is time when server wrote results to stream */
responseWallTimeMs: number;
/**
* Partial results, server will send them regularly after enough audio data was received from user. This are current text estimation
* from final_time_ms to partial_time_ms. Could change after new data will arrive.
*/
partial?: AlternativeUpdate | undefined;
/** Final results, the recognition is now fixed until final_time_ms. For now, final is sent only if the EOU event was triggered. This could be change in future releases. */
final?: AlternativeUpdate | undefined;
/**
* After EOU classifier, send the message with final, send the EouUpdate with time of EOU
* before eou_update we send final with the same time. there could be several finals before eou update.
*/
eouUpdate?: EouUpdate | undefined;
/**
* For each final, if normalization is enabled, sent the normalized text (or some other advanced post-processing).
* Final normalization will introduce additional latency.
*/
finalRefinement?: FinalRefinement | undefined;
/** Status messages, send by server with fixed interval (keep-alive). */
statusCode?: StatusCode | undefined;
/** Result of the triggered classifier */
classifierUpdate?: RecognitionClassifierUpdate | undefined;
/** Speech statistics for every speaker */
speakerAnalysis?: SpeakerAnalysis | undefined;
/** Conversation statistics */
conversationAnalysis?: ConversationAnalysis | undefined;
/** Tag for distinguish audio channels. */
channelTag: string;
}
export declare const TextNormalizationOptions: {
$type: "speechkit.stt.v3.TextNormalizationOptions";
encode(message: TextNormalizationOptions, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TextNormalizationOptions;
fromJSON(object: any): TextNormalizationOptions;
toJSON(message: TextNormalizationOptions): unknown;
fromPartial<I extends {
profanityFilter?: boolean | undefined;
literatureText?: boolean | undefined;
textNormalization?: TextNormalizationOptions_TextNormalization | undefined;
phoneFormattingMode?: TextNormalizationOptions_PhoneFormattingMode | undefined;
} & {
profanityFilter?: boolean | undefined;
literatureText?: boolean | undefined;
textNormalization?: TextNormalizationOptions_TextNormalization | undefined;
phoneFormattingMode?: TextNormalizationOptions_PhoneFormattingMode | undefined;
} & Record<Exclude<keyof I, "$type" | "profanityFilter" | "literatureText" | "textNormalization" | "phoneFormattingMode">, never>>(object: I): TextNormalizationOptions;
};
export declare const DefaultEouClassifier: {
$type: "speechkit.stt.v3.DefaultEouClassifier";
encode(message: DefaultEouClassifier, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): DefaultEouClassifier;
fromJSON(object: any): DefaultEouClassifier;
toJSON(message: DefaultEouClassifier): unknown;
fromPartial<I extends {
type?: DefaultEouClassifier_EouSensitivity | undefined;
maxPauseBetweenWordsHintMs?: number | undefined;
} & {
type?: DefaultEouClassifier_EouSensitivity | undefined;
maxPauseBetweenWordsHintMs?: number | undefined;
} & Record<Exclude<keyof I, "$type" | "type" | "maxPauseBetweenWordsHintMs">, never>>(object: I): DefaultEouClassifier;
};
export declare const ExternalEouClassifier: {
$type: "speechkit.stt.v3.ExternalEouClassifier";
encode(_: ExternalEouClassifier, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ExternalEouClassifier;
fromJSON(_: any): ExternalEouClassifier;
toJSON(_: ExternalEouClassifier): unknown;
fromPartial<I extends {} & {} & Record<Exclude<keyof I, "$type">, never>>(_: I): ExternalEouClassifier;
};
export declare const EouClassifierOptions: {
$type: "speechkit.stt.v3.EouClassifierOptions";
encode(message: EouClassifierOptions, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): EouClassifierOptions;
fromJSON(object: any): EouClassifierOptions;
toJSON(message: EouClassifierOptions): unknown;
fromPartial<I extends {
defaultClassifier?: {
type?: DefaultEouClassifier_EouSensitivity | undefined;
maxPauseBetweenWordsHintMs?: number | undefined;
} | undefined;
externalClassifier?: {} | undefined;
} & {
defaultClassifier?: ({
type?: DefaultEouClassifier_EouSensitivity | undefined;
maxPauseBetweenWordsHintMs?: number | undefined;
} & {
type?: DefaultEouClassifier_EouSensitivity | undefined;
maxPauseBetweenWordsHintMs?: number | undefined;
} & Record<Exclude<keyof I["defaultClassifier"], "$type" | "type" | "maxPauseBetweenWordsHintMs">, never>) | undefined;
externalClassifier?: ({} & {} & Record<Exclude<keyof I["externalClassifier"], "$type">, never>) | undefined;
} & Record<Exclude<keyof I, "$type" | "defaultClassifier" | "externalClassifier">, never>>(object: I): EouClassifierOptions;
};
export declare const RecognitionClassifier: {
$type: "speechkit.stt.v3.RecognitionClassifier";
encode(message: RecognitionClassifier, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RecognitionClassifier;
fromJSON(object: any): RecognitionClassifier;
toJSON(message: RecognitionClassifier): unknown;
fromPartial<I extends {
triggers?: RecognitionClassifier_TriggerType[] | undefined;
classifier?: string | undefined;
} & {
triggers?: (RecognitionClassifier_TriggerType[] & RecognitionClassifier_TriggerType[] & Record<Exclude<keyof I["triggers"], "$type" | keyof RecognitionClassifier_TriggerType[]>, never>) | undefined;
classifier?: string | undefined;
} & Record<Exclude<keyof I, "$type" | "triggers" | "classifier">, never>>(object: I): RecognitionClassifier;
};
export declare const RecognitionClassifierOptions: {
$type: "speechkit.stt.v3.RecognitionClassifierOptions";
encode(message: RecognitionClassifierOptions, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RecognitionClassifierOptions;
fromJSON(object: any): RecognitionClassifierOptions;
toJSON(message: RecognitionClassifierOptions): unknown;
fromPartial<I extends {
classifiers?: {
triggers?: RecognitionClassifier_TriggerType[] | undefined;
classifier?: string | undefined;
}[] | undefined;
} & {
classifiers?: ({
triggers?: RecognitionClassifier_TriggerType[] | undefined;
classifier?: string | undefined;
}[] & ({
triggers?: RecognitionClassifier_TriggerType[] | undefined;
classifier?: string | undefined;
} & {
triggers?: (RecognitionClassifier_TriggerType[] & RecognitionClassifier_TriggerType[] & Record<Exclude<keyof I["classifiers"][number]["triggers"], "$type" | keyof RecognitionClassifier_TriggerType[]>, never>) | undefined;
classifier?: string | undefined;
} & Record<Exclude<keyof I["classifiers"][number], "$type" | "triggers" | "classifier">, never>)[] & Record<Exclude<keyof I["classifiers"], "$type" | keyof {
triggers?: RecognitionClassifier_TriggerType[] | undefined;
classifier?: string | undefined;
}[]>, never>) | undefined;
} & Record<Exclude<keyof I, "$type" | "classifiers">, never>>(object: I): RecognitionClassifierOptions;
};
export declare const SpeechAnalysisOptions: {
$type: "speechkit.stt.v3.SpeechAnalysisOptions";
encode(message: SpeechAnalysisOptions, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): SpeechAnalysisOptions;
fromJSON(object: any): SpeechAnalysisOptions;
toJSON(message: SpeechAnalysisOptions): unknown;
fromPartial<I extends {
enableSpeakerAnalysis?: boolean | undefined;
enableConversationAnalysis?: boolean | undefined;
descriptiveStatisticsQuantiles?: number[] | undefined;
} & {
enableSpeakerAnalysis?: boolean | undefined;
enableConversationAnalysis?: boolean | undefined;
descriptiveStatisticsQuantiles?: (number[] & number[] & Record<Exclude<keyof I["descriptiveStatisticsQuantiles"], "$type" | keyof number[]>, never>) | undefined;
} & Record<Exclude<keyof I, "$type" | "enableSpeakerAnalysis" | "enableConversationAnalysis" | "descriptiveStatisticsQuantiles">, never>>(object: I): SpeechAnalysisOptions;
};
export declare const RawAudio: {
$type: "speechkit.stt.v3.RawAudio";
encode(message: RawAudio, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RawAudio;
fromJSON(object: any): RawAudio;
toJSON(message: RawAudio): unknown;
fromPartial<I extends {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} & {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} & Record<Exclude<keyof I, "$type" | "audioEncoding" | "sampleRateHertz" | "audioChannelCount">, never>>(object: I): RawAudio;
};
export declare const ContainerAudio: {
$type: "speechkit.stt.v3.ContainerAudio";
encode(message: ContainerAudio, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ContainerAudio;
fromJSON(object: any): ContainerAudio;
toJSON(message: ContainerAudio): unknown;
fromPartial<I extends {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} & {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} & Record<Exclude<keyof I, "$type" | "containerAudioType">, never>>(object: I): ContainerAudio;
};
export declare const AudioFormatOptions: {
$type: "speechkit.stt.v3.AudioFormatOptions";
encode(message: AudioFormatOptions, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AudioFormatOptions;
fromJSON(object: any): AudioFormatOptions;
toJSON(message: AudioFormatOptions): unknown;
fromPartial<I extends {
rawAudio?: {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} | undefined;
containerAudio?: {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} | undefined;
} & {
rawAudio?: ({
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} & {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} & Record<Exclude<keyof I["rawAudio"], "$type" | "audioEncoding" | "sampleRateHertz" | "audioChannelCount">, never>) | undefined;
containerAudio?: ({
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} & {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} & Record<Exclude<keyof I["containerAudio"], "$type" | "containerAudioType">, never>) | undefined;
} & Record<Exclude<keyof I, "$type" | "rawAudio" | "containerAudio">, never>>(object: I): AudioFormatOptions;
};
export declare const LanguageRestrictionOptions: {
$type: "speechkit.stt.v3.LanguageRestrictionOptions";
encode(message: LanguageRestrictionOptions, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): LanguageRestrictionOptions;
fromJSON(object: any): LanguageRestrictionOptions;
toJSON(message: LanguageRestrictionOptions): unknown;
fromPartial<I extends {
languageCode?: string[] | undefined;
restrictionType?: LanguageRestrictionOptions_LanguageRestrictionType | undefined;
} & {
languageCode?: (string[] & string[] & Record<Exclude<keyof I["languageCode"], "$type" | keyof string[]>, never>) | undefined;
restrictionType?: LanguageRestrictionOptions_LanguageRestrictionType | undefined;
} & Record<Exclude<keyof I, "$type" | "languageCode" | "restrictionType">, never>>(object: I): LanguageRestrictionOptions;
};
export declare const RecognitionModelOptions: {
$type: "speechkit.stt.v3.RecognitionModelOptions";
encode(message: RecognitionModelOptions, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RecognitionModelOptions;
fromJSON(object: any): RecognitionModelOptions;
toJSON(message: RecognitionModelOptions): unknown;
fromPartial<I extends {
model?: string | undefined;
textNormalization?: {
profanityFilter?: boolean | undefined;
literatureText?: boolean | undefined;
textNormalization?: TextNormalizationOptions_TextNormalization | undefined;
phoneFormattingMode?: TextNormalizationOptions_PhoneFormattingMode | undefined;
} | undefined;
audioProcessingType?: RecognitionModelOptions_AudioProcessingType | undefined;
audioFormat?: {
rawAudio?: {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} | undefined;
containerAudio?: {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} | undefined;
} | undefined;
languageRestriction?: {
languageCode?: string[] | undefined;
restrictionType?: LanguageRestrictionOptions_LanguageRestrictionType | undefined;
} | undefined;
} & {
model?: string | undefined;
textNormalization?: ({
profanityFilter?: boolean | undefined;
literatureText?: boolean | undefined;
textNormalization?: TextNormalizationOptions_TextNormalization | undefined;
phoneFormattingMode?: TextNormalizationOptions_PhoneFormattingMode | undefined;
} & {
profanityFilter?: boolean | undefined;
literatureText?: boolean | undefined;
textNormalization?: TextNormalizationOptions_TextNormalization | undefined;
phoneFormattingMode?: TextNormalizationOptions_PhoneFormattingMode | undefined;
} & Record<Exclude<keyof I["textNormalization"], "$type" | "profanityFilter" | "literatureText" | "textNormalization" | "phoneFormattingMode">, never>) | undefined;
audioProcessingType?: RecognitionModelOptions_AudioProcessingType | undefined;
audioFormat?: ({
rawAudio?: {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} | undefined;
containerAudio?: {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} | undefined;
} & {
rawAudio?: ({
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} & {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} & Record<Exclude<keyof I["audioFormat"]["rawAudio"], "$type" | "audioEncoding" | "sampleRateHertz" | "audioChannelCount">, never>) | undefined;
containerAudio?: ({
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} & {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} & Record<Exclude<keyof I["audioFormat"]["containerAudio"], "$type" | "containerAudioType">, never>) | undefined;
} & Record<Exclude<keyof I["audioFormat"], "$type" | "rawAudio" | "containerAudio">, never>) | undefined;
languageRestriction?: ({
languageCode?: string[] | undefined;
restrictionType?: LanguageRestrictionOptions_LanguageRestrictionType | undefined;
} & {
languageCode?: (string[] & string[] & Record<Exclude<keyof I["languageRestriction"]["languageCode"], "$type" | keyof string[]>, never>) | undefined;
restrictionType?: LanguageRestrictionOptions_LanguageRestrictionType | undefined;
} & Record<Exclude<keyof I["languageRestriction"], "$type" | "languageCode" | "restrictionType">, never>) | undefined;
} & Record<Exclude<keyof I, "$type" | "model" | "textNormalization" | "audioProcessingType" | "audioFormat" | "languageRestriction">, never>>(object: I): RecognitionModelOptions;
};
export declare const StreamingOptions: {
$type: "speechkit.stt.v3.StreamingOptions";
encode(message: StreamingOptions, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): StreamingOptions;
fromJSON(object: any): StreamingOptions;
toJSON(message: StreamingOptions): unknown;
fromPartial<I extends {
recognitionModel?: {
model?: string | undefined;
textNormalization?: {
profanityFilter?: boolean | undefined;
literatureText?: boolean | undefined;
textNormalization?: TextNormalizationOptions_TextNormalization | undefined;
phoneFormattingMode?: TextNormalizationOptions_PhoneFormattingMode | undefined;
} | undefined;
audioProcessingType?: RecognitionModelOptions_AudioProcessingType | undefined;
audioFormat?: {
rawAudio?: {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} | undefined;
containerAudio?: {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} | undefined;
} | undefined;
languageRestriction?: {
languageCode?: string[] | undefined;
restrictionType?: LanguageRestrictionOptions_LanguageRestrictionType | undefined;
} | undefined;
} | undefined;
eouClassifier?: {
defaultClassifier?: {
type?: DefaultEouClassifier_EouSensitivity | undefined;
maxPauseBetweenWordsHintMs?: number | undefined;
} | undefined;
externalClassifier?: {} | undefined;
} | undefined;
recognitionClassifier?: {
classifiers?: {
triggers?: RecognitionClassifier_TriggerType[] | undefined;
classifier?: string | undefined;
}[] | undefined;
} | undefined;
speechAnalysis?: {
enableSpeakerAnalysis?: boolean | undefined;
enableConversationAnalysis?: boolean | undefined;
descriptiveStatisticsQuantiles?: number[] | undefined;
} | undefined;
} & {
recognitionModel?: ({
model?: string | undefined;
textNormalization?: {
profanityFilter?: boolean | undefined;
literatureText?: boolean | undefined;
textNormalization?: TextNormalizationOptions_TextNormalization | undefined;
phoneFormattingMode?: TextNormalizationOptions_PhoneFormattingMode | undefined;
} | undefined;
audioProcessingType?: RecognitionModelOptions_AudioProcessingType | undefined;
audioFormat?: {
rawAudio?: {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} | undefined;
containerAudio?: {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} | undefined;
} | undefined;
languageRestriction?: {
languageCode?: string[] | undefined;
restrictionType?: LanguageRestrictionOptions_LanguageRestrictionType | undefined;
} | undefined;
} & {
model?: string | undefined;
textNormalization?: ({
profanityFilter?: boolean | undefined;
literatureText?: boolean | undefined;
textNormalization?: TextNormalizationOptions_TextNormalization | undefined;
phoneFormattingMode?: TextNormalizationOptions_PhoneFormattingMode | undefined;
} & {
profanityFilter?: boolean | undefined;
literatureText?: boolean | undefined;
textNormalization?: TextNormalizationOptions_TextNormalization | undefined;
phoneFormattingMode?: TextNormalizationOptions_PhoneFormattingMode | undefined;
} & Record<Exclude<keyof I["recognitionModel"]["textNormalization"], "$type" | "profanityFilter" | "literatureText" | "textNormalization" | "phoneFormattingMode">, never>) | undefined;
audioProcessingType?: RecognitionModelOptions_AudioProcessingType | undefined;
audioFormat?: ({
rawAudio?: {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} | undefined;
containerAudio?: {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} | undefined;
} & {
rawAudio?: ({
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} & {
audioEncoding?: RawAudio_AudioEncoding | undefined;
sampleRateHertz?: number | undefined;
audioChannelCount?: number | undefined;
} & Record<Exclude<keyof I["recognitionModel"]["audioFormat"]["rawAudio"], "$type" | "audioEncoding" | "sampleRateHertz" | "audioChannelCount">, never>) | undefined;
containerAudio?: ({
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} & {
containerAudioType?: ContainerAudio_ContainerAudioType | undefined;
} & Record<Exclude<keyof I["recognitionModel"]["audioFormat"]["containerAudio"], "$type" | "containerAudioType">, never>) | undefined;
} & Record<Exclude<keyof I["recognitionModel"]["audioFormat"], "$type" | "rawAudio" | "containerAudio">, never>) | undefined;
languageRestriction?: ({
languageCode?: string[] | undefined;
restrictionType?: LanguageRestrictionOptions_LanguageRestrictionType | undefined;
} & {
languageCode?: (string[] & string[] & Record<Exclude<keyof I["recognitionModel"]["languageRestriction"]["languageCode"], "$type" | keyof string[]>, never>) | undefined;
restrictionType?: LanguageRestrictionOptions_LanguageRestrictionType | undefined;
} & Record<Exclude<keyof I["recognitionModel"]["languageRestriction"], "$type" | "languageCode" | "restrictionType">, never>) | undefined;
} & Record<Exclude<keyof I["recognitionModel"], "$type" | "model" | "textNormalization" | "audioProcessingType" | "audioFormat" | "languageRestriction">, never>) | undefined;
eouClassifier?: ({
defaultClassifier?: {
type?: DefaultEouClassifier_EouSensitivity | undefined;
maxPauseBetweenWordsHintMs?: number | undefined;
} | undefined;
externalClassifier?: {} | undefined;
} & {
defaultClassifier?: ({
type?: DefaultEouClassifier_EouSensitivity | undefined;
maxPauseBetweenWordsHintMs?: number | undefined;
} & {
type?: DefaultEouClassifier_EouSensitivity | undefined;
maxPauseBetweenWordsHintMs?: number | undefined;
} & Record<Exclude<keyof I["eouClassifier"]["defaultClassifier"], "$type" | "type" | "maxPauseBetweenWordsHintMs">, never>) | undefined;
externalClassifier?: ({} & {} & Record<Exclude<keyof I["eouClassifier"]["externalClassifier"], "$type">, never>) | undefined;
} & Record<Exclude<keyof I["eouClassifier"], "$type" | "defaultClassifier" | "externalClassifier">, never>) | undefined;
recognitionClassifier?: ({
classifiers?: {
triggers?: RecognitionClassifier_TriggerType[] | undefined;
classifier?: string | undefined;
}[] | undefined;
} & {
classifiers?: ({
triggers?: RecognitionClassifier_TriggerType[] | undefined;
classifier?: string | undefined;
}[] & ({
triggers?: RecognitionClassifier_TriggerType[] | undefined;
classifier?: string | undefined;
} & {
triggers?: (RecognitionClassifier_TriggerType[] & RecognitionClassifier_TriggerType[] & Record<Exclude<keyof I["recognitionClassifier"]["classifiers"][number]["triggers"], "$type" | keyof RecognitionClassifier_TriggerType[]>, never>) | undefined;
classifier?: string | undefined;
} & Record<Exclude<keyof I["recognitionClassifier"]["classifiers"][number], "$type" | "triggers" | "classifier">, never>)[] & Record<Exclude<keyof I["recognitionClassifier"]["classifiers"], "$type" | keyof {
triggers?: RecognitionClassifier_TriggerType[] | undefined;
classifier?: string | undefined;
}[]>, never>) | undefined;
} & Record<Exclude<keyof I["recognitionClassifier"], "$type" | "classifiers">, never>) | undefined;
speechAnalysis?: ({
enableSpeakerAnalysis?: boolean | undefined;
enableConversationAnalysis?: boolean | undefined;
descriptiveStatisticsQuantiles?: number[] | undefined;
} & {
enableSpeakerAnalysis?: boolean | undefined;
enableConversationAnalysis?: boolean | undefined;
descriptiveStatisticsQuantiles?: (number[] & number[] & Record<Exclude<keyof I["speechAnalysis"]["descriptiveStatisticsQuantiles"], "$type" | keyof number[]>, never>) | undefined;
} & Record<Exclude<keyof I["speechAnalysis"], "$type" | "enableSpeakerAnalysis" | "enableConversationAnalysis" | "descriptiveStatisticsQuantiles">, never>) | undefined;
} & Record<Exclude<keyof I, "$type" | "recognitionModel" | "eouClassifier" | "recognitionClassifier" | "speechAnalysis">, never>>(object: I): StreamingOptions;
};
export declare const AudioChunk: {
$type: "speechkit.stt.v3.AudioChunk";
encode(message: AudioChunk, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AudioChunk;
fromJSON(object: any): AudioChunk;
toJSON(message: AudioChunk): unknown;
fromPartial<I extends {
data?: Buffer | undefined;
} & {
data?: Buffer | undefined;
} & Record<Exclude<keyof I, "$type" | "data">, never>>(object: I): AudioChunk;
};
export declare const SilenceChunk: {
$t