@novo-learning/novo-sdk
Version:
SDK for the Novolanguage Speech Analysis API
1 lines • 13.3 kB
JSON
{"openapi":"3.0.0","paths":{"/v1/pronunciations/g2p":{"post":{"operationId":"getPronunciationsV1","summary":"Get pronunciation for a phrase","description":"Operation accepts a language and a phrase, which is separated by whitespaces, special characters need not be escaped","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PronunciationRequestDtoV1"}}}},"responses":{"201":{"description":"Pronunciation for a phrase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhrasePronunciationDtoV1"}}}}},"security":[{"access_token":[]}],"tags":["pronunciation"]}},"/v2/pronunciations/g2p":{"post":{"operationId":"getPronunciationsV2","summary":"Get pronunciation for a phrase","description":"Operation accepts a language and a phrase, which is separated by whitespaces, special characters need not be escaped","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PronunciationRequestDtoV2"}}}},"responses":{"201":{"description":"Pronunciation for a phrase","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhrasePronunciationDtoV2"}}}}},"security":[{"access_token":[]}],"tags":["pronunciation"]}},"/v1/confusions/{lang}":{"get":{"operationId":"getConfusionsV1","summary":"","description":"Get a list of confusions defined for a language","parameters":[{"name":"lang","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConfusionRuleDtoV1"}}}}},"201":{"description":"Confusion rules for a language","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConfusionRuleDtoV1"}}}}}},"security":[{"access_token":[]}],"tags":["confusion"]},"post":{"operationId":"addConfusionsV1","summary":"","description":"Add a confusion rule for a language","parameters":[{"name":"lang","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddConfusionDtoV1"}}}},"responses":{"201":{"description":"Add a confusion rule for a language","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfusionRuleDtoV1"}}}}},"security":[{"access_token":[]}],"tags":["confusion"]}},"/v1/confusions/{lang}/{key}":{"patch":{"operationId":"updateConfusionsV1","summary":"","description":"Update a confusion rule identified by a key for a language","parameters":[{"name":"lang","required":true,"in":"path","schema":{"type":"string"}},{"name":"key","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConfusionDtoV1"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfusionRuleDtoV1"}}}},"201":{"description":"Update a confusion rule for a language","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfusionRuleDtoV1"}}}}},"security":[{"access_token":[]}],"tags":["confusion"]},"delete":{"operationId":"deleteConfusionsV1","summary":"","description":"Delete a confusion rule identified by a key for a language","parameters":[{"name":"lang","required":true,"in":"path","schema":{"type":"string"}},{"name":"key","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""},"201":{"description":"Delete a confusion rule for a language","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfusionRuleDtoV1"}}}}},"security":[{"access_token":[]}],"tags":["confusion"]}},"/v1/metadata":{"post":{"operationId":"getMetadataV1","summary":"","description":"Get metadata for a list of words","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetadataRequestDtoV1"}}}},"responses":{"201":{"description":"Metadata for each word in the list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MetadataDtoV1"}}}}}},"security":[{"access_token":[]}],"tags":["metadata"]}},"/v1/metadata/pronunciation":{"post":{"operationId":"getPronunciationMetadataV1","summary":"","description":"Get pronunciation metadata for a list of words","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PronunciationMetadataRequestDtoV1"}}}},"responses":{"201":{"description":"Metadata for each word in the list","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MetadataDtoV1"}}}}}},"security":[{"access_token":[]}],"tags":["metadata"]}}},"info":{"title":"Pronunciation API","description":"","version":"1.0","contact":{}},"tags":[{"name":"pronunciation","description":""}],"servers":[],"components":{"schemas":{"PronunciationRequestDtoV1":{"type":"object","properties":{"targetLanguage":{"enum":["ar-idn","de","en","nl","zh","fr","es"],"type":"string","description":"language of the phrase"},"phrase":{"type":"string","description":"the phrase, written as is, verbatim, with special characters"},"confusion":{"description":"key of a confusion rule to apply or a custom confusion list. A confusion list is a list of a list of phonemes which are commonly confused when pronunciating a word","oneOf":[{"type":"string"},{"type":"object"}]}},"required":["targetLanguage","phrase"]},"ProsodyTargetDtoV1":{"type":"object","properties":{"pause":{"enum":["prohibited","optional","mandatory"],"type":"string","description":"indication whether a pause is necessary, optional, or prohibited"},"intonation":{"enum":["falling","rising","flat"],"type":"string","description":"intonation slope target: falling, rising, or flat"},"stress":{"type":"number","description":"indication of the syllable that carries word stress"}}},"PronunciationDtoV1":{"type":"object","properties":{"word":{"type":"string","description":"the word the phonemeList is based on"},"correctPronunciations":{"type":"array","description":"list of phonemeLists of correct pronunciations","items":{"type":"array","items":{"type":"string"}}},"incorrectPronunciations":{"type":"array","description":"list of phonemeLists of incorrect pronunciations","items":{"type":"array","items":{"type":"string"}}},"liaisonPhoneme":{"type":"string","description":"optional liaison phoneme to connect this pronunciation with previous"},"prosody":{"description":"description of prosody targets","allOf":[{"$ref":"#/components/schemas/ProsodyTargetDtoV1"}]},"punctuation":{"type":"string","description":"indication whether the word is followed by punctuation"}},"required":["word","correctPronunciations","incorrectPronunciations"]},"TokenPronunciationDtoV1":{"type":"object","properties":{"token":{"type":"string","description":"a single token detected from the input"},"expanded":{"type":"string","description":"the expanded token, e.g. numbers are written as multiple words"},"words":{"description":"map of words and their pronunciation","type":"array","items":{"$ref":"#/components/schemas/PronunciationDtoV1"}}},"required":["token","expanded","words"]},"PhrasePronunciationDtoV1":{"type":"object","properties":{"language":{"enum":["ar-idn","de","en","nl","zh","fr","es"],"type":"string","description":"language of the phrase"},"phrase":{"type":"string","description":"input phrase"},"tokens":{"description":"tokenized g2p output for each detected token (word) in the phrase","type":"array","items":{"$ref":"#/components/schemas/TokenPronunciationDtoV1"}}},"required":["language","phrase","tokens"]},"PronunciationRequestDtoV2":{"type":"object","properties":{"targetLanguage":{"enum":["ar-idn","de","en","nl","zh","fr","es"],"type":"string","description":"language of the phrase"},"phrase":{"type":"string","description":"the phrase, written as is, verbatim, with special characters"},"confusion":{"description":"key of a confusion rule to apply or a custom confusion list. A confusion list is a list of a list of phonemes which are commonly confused when pronunciating a word","oneOf":[{"type":"string"},{"type":"object"}]}},"required":["targetLanguage","phrase"]},"ProsodyTargetDtoV2":{"type":"object","properties":{"pause":{"enum":["prohibited","optional","mandatory"],"type":"string","description":"indication whether a pause is necessary, optional, or prohibited"},"intonation":{"enum":["falling","rising","flat"],"type":"string","description":"intonation slope target: falling, rising, or flat"},"stress":{"type":"number","description":"indication of the syllable that carries word stress"}}},"PronunciationDtoV2":{"type":"object","properties":{"word":{"type":"string","description":"the word the phonemeList is based on"},"correctPronunciations":{"type":"array","description":"list of phonemeLists of correct pronunciations","items":{"type":"object","required":["phonemes"],"properties":{"phonemes":{"type":"array","items":{"type":"object","required":["phoneme"],"properties":{"phoneme":{"type":"string","description":"representation of a sound"},"duration":{"type":"array","items":{"type":"string","enum":["short","normal","long","superlong"],"description":"(optional) required duration of the sound"}}}}}}}},"incorrectPronunciations":{"type":"array","description":"list of phonemeLists of incorrect pronunciations","items":{"type":"object","required":["phonemes"],"properties":{"phonemes":{"type":"array","items":{"type":"object","required":["phoneme"],"properties":{"phoneme":{"type":"string","description":"representation of a sound"},"duration":{"type":"array","items":{"type":"string","enum":["short","normal","long","superlong"],"description":"(optional) required duration of the sound"}}}}}}}},"liaisonPhoneme":{"type":"string","description":"optional liaison phoneme to connect this pronunciation with previous"},"prosody":{"description":"description of prosody targets","allOf":[{"$ref":"#/components/schemas/ProsodyTargetDtoV2"}]}},"required":["word","correctPronunciations","incorrectPronunciations"]},"TokenPronunciationDtoV2":{"type":"object","properties":{"token":{"type":"string","description":"a single token detected from the input"},"expanded":{"type":"string","description":"the expanded token, e.g. numbers are written as multiple words"},"words":{"description":"map of words and their pronunciation","type":"array","items":{"$ref":"#/components/schemas/PronunciationDtoV2"}}},"required":["token","expanded","words"]},"PhrasePronunciationDtoV2":{"type":"object","properties":{"language":{"enum":["ar-idn","de","en","nl","zh","fr","es"],"type":"string","description":"language of the phrase"},"phrase":{"type":"string","description":"input phrase"},"tokens":{"description":"tokenized g2p output for each detected token (word) in the phrase","type":"array","items":{"$ref":"#/components/schemas/TokenPronunciationDtoV2"}}},"required":["language","phrase","tokens"]},"ConfusionRuleDtoV1":{"type":"object","properties":{"key":{"type":"string"},"language":{"enum":["ar-idn","de","en","nl","zh","fr","es"],"type":"string"},"description":{"type":"string"},"confusion":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"required":["key","language","description","confusion"]},"AddConfusionDtoV1":{"type":"object","properties":{"key":{"type":"string"},"description":{"type":"string"},"confusion":{"type":"array","items":{"type":"array","items":{"type":"string"}}}},"required":["key","description","confusion"]},"UpdateConfusionDtoV1":{"type":"object","properties":{"description":{"type":"string"},"confusion":{"type":"array","items":{"type":"array","items":{"type":"string"}}}}},"UserData":{"type":"object","properties":{}},"MetadataRequestDtoV1":{"type":"object","properties":{"phrase":{"type":"string","description":"The phrase for which metadata is requested"},"targetLanguage":{"enum":["ar-idn","de","en","nl","zh","fr","es"],"type":"string","description":"language of the phrase"},"secret":{"type":"string"},"userData":{"$ref":"#/components/schemas/UserData"}},"required":["phrase","targetLanguage"]},"MetadataDtoV1":{"type":"object","properties":{"word":{"type":"string"},"metadata":{"type":"object"}},"required":["word","metadata"]},"WordPronunciationDtoV1":{"type":"object","properties":{"word":{"type":"string","description":"A word"},"pronunciation":{"type":"array","description":"The closest correct pronunciation of the word","items":{"type":"object","required":["phonemes"],"properties":{"phonemes":{"type":"array","items":{"type":"object","required":["phoneme"],"properties":{"phoneme":{"type":"string","description":"representation of a sound"},"duration":{"type":"array","items":{"type":"string","enum":["short","normal","long","superlong"],"description":"(optional) required duration of the sound"}}}}}}}}},"required":["word","pronunciation"]},"PronunciationMetadataRequestDtoV1":{"type":"object","properties":{"language":{"enum":["ar-idn","de","en","nl","zh","fr","es"],"type":"string","description":"language of the phrase"},"words":{"type":"array","items":{"$ref":"#/components/schemas/WordPronunciationDtoV1"}},"secret":{"type":"string"},"userData":{"$ref":"#/components/schemas/UserData"}},"required":["language","words"]}}}}