UNPKG

sber-salute-speech-recognition

Version:

A library that produces audio transcriptions using the SBER Salute Speech service.

21 lines (20 loc) 987 B
import { SpeechToTextResult, ChannelsCount, SberRecognizeHints } from './types'; import { Scope, AudioEncoding } from './enums'; export interface ISberSaluteSpeechRecognitionService { speechToText(audioPath: string, encoding: AudioEncoding, channels_count?: ChannelsCount, hints?: SberRecognizeHints): Promise<SpeechToTextResult>; } export declare class SberSaluteSpeechRecognitionService implements ISberSaluteSpeechRecognitionService { private readonly scope; private readonly authKey; private token; private readonly sessionId; constructor(authKey: string, sessionId?: string, scope?: Scope); private updateAccessToken; private getAccessToken; private uploadFileForRecognition; private startRecognition; private getRecognitionStatus; private getRecognitionResult; private delay; speechToText(audioPath: string, encoding: AudioEncoding, channels_count?: ChannelsCount, hints?: SberRecognizeHints): Promise<SpeechToTextResult>; }