UNPKG

sonix-speech-recognition

Version:

A library that produces audio transcriptions and translations using the Sonix.AI service.

19 lines (18 loc) 961 B
import { SpeechToTextRequest, SpeechToTextResponse, TranslateTranscriptionRequest, TranslateTranscriptionResponse } from './types'; interface ISonixSpeechRecognitionService { speechToText(request: SpeechToTextRequest): Promise<SpeechToTextResponse>; translateTranscription(request: TranslateTranscriptionRequest): Promise<TranslateTranscriptionResponse>; } export declare class SonixSpeechRecognitionService implements ISonixSpeechRecognitionService { private readonly authKey; constructor(authKey: string); private uploadFileForTranscription; private getTranscriptionStatus; private getTranscriptionResult; private queueTranslation; private getTranslationStatus; private delay; speechToText({ audioUrl, fileName, language, audioFilePath, }: SpeechToTextRequest): Promise<SpeechToTextResponse>; translateTranscription(request: TranslateTranscriptionRequest): Promise<TranslateTranscriptionResponse>; } export {};