UNPKG

@novo-learning/novo-sdk

Version:

SDK for the Novolanguage Speech Analysis API

59 lines (50 loc) 1.35 kB
import { LanguageCode } from '../../../entities'; const PhoneDurationDto = { short: 'short', normal: 'normal', long: 'long', superlong: 'superlong', } as const; type PhoneDurationDto = typeof PhoneDurationDto[keyof typeof PhoneDurationDto]; const PauseDto = { prohibited: 'prohibited', optional: 'optional', mandatory: 'mandatory', } as const; type PauseDto = typeof PauseDto[keyof typeof PauseDto]; export class PhonemesDtoV2 { phoneme: string; duration?: Array<PhoneDurationDto>; } export class CorrectPronunciationsDtoV2 { phonemes: Array<PhonemesDtoV2>; } const IntonationDto = { falling: 'falling', rising: 'rising', flat: 'flat', } as const; type IntonationDto = typeof IntonationDto[keyof typeof IntonationDto]; export class ProsodyDtoV2 { pause?: PauseDto; intonation?: IntonationDto; stress?: number; } export class WordPronunciationDtoV2 { word: string; correctPronunciations: Array<CorrectPronunciationsDtoV2>; incorrectPronunciations: Array<CorrectPronunciationsDtoV2>; liaisonPhoneme?: string; prosody?: ProsodyDtoV2; punctuation?: string; } export class TokenPronunciationDtoV2 { token: string; expanded: string; words: Array<WordPronunciationDtoV2>; } export class PhrasePronunciationDtoV2 { language: LanguageCode; phrase: string; tokens: Array<TokenPronunciationDtoV2>; }