sonix-speech-recognition
Version:
A library that produces audio transcriptions and translations using the Sonix.AI service.
52 lines (51 loc) • 1.56 kB
TypeScript
export declare type JobStatus = 'completed' | 'failed';
export declare type SpeechToTextRequest = {
audioUrl?: string;
audioFilePath?: string;
fileName?: string;
language: SupportedLanguage;
};
export declare type SpeechToTextResponse = {
jobId: string;
text: string;
status: JobStatus;
error?: string;
};
export declare type TranslateTranscriptionRequest = {
transcriptionJobId: string;
language: SupportedLanguage;
};
export declare type TranslateTranscriptionResponse = {
jobId: string;
text: string;
status: JobStatus;
error?: string;
};
export declare type TranslationStatusResponse = {
language: string;
status: string;
};
export declare type UploadAudioResponse = {
id: string;
name: string;
status: string;
language: string;
created_at: number;
public_url: string;
};
export declare type TranscriptionStatusResponse = {
id: string;
name: string;
duration: number;
language: string;
video: boolean;
status: string;
created_at: number;
duplicate_media_id?: string;
folder: {
name: string;
id: string;
};
};
export declare type TranscriptionResultResponse = string;
export declare type SupportedLanguage = 'en' | 'fr' | 'de' | 'es' | 'ar' | 'hy-AM' | 'bg' | 'ca' | 'hr' | 'yue-Hant-HK' | 'cmn-Hans-CN' | 'cs' | 'da' | 'nl' | 'fi' | 'el' | 'he-IL' | 'hi' | 'hu' | 'id-ID' | 'it' | 'ja' | 'ko' | 'lv' | 'lt' | 'ms-MY' | 'nb-NO' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'th-TH' | 'tr-TR' | 'vi-VN' | 'uk';