microsoft-cognitiveservices-speech-sdk
Version:
Microsoft Cognitive Services Speech SDK for JavaScript
29 lines (28 loc) • 1.04 kB
TypeScript
import { IPrimaryLanguage, ITranslations, RecognitionStatus } from "../Exports.js";
export interface ITranslationPhrase {
RecognitionStatus: RecognitionStatus;
Offset: number;
Duration: number;
Translation?: ITranslations;
Text?: string;
DisplayText?: string;
PrimaryLanguage?: IPrimaryLanguage;
}
export declare class TranslationPhrase implements ITranslationPhrase {
private privTranslationPhrase;
private constructor();
static fromJSON(json: string, baseOffset: number): TranslationPhrase;
static fromTranslationResponse(translationResponse: {
SpeechPhrase: ITranslationPhrase;
}, baseOffset: number): TranslationPhrase;
get RecognitionStatus(): RecognitionStatus;
get Offset(): number;
get Duration(): number;
get Text(): string | undefined;
get Language(): string | undefined;
get Confidence(): string | undefined;
get Translation(): ITranslations | undefined;
asJson(): string;
private mapRecognitionStatus;
private mapTranslationStatus;
}