CLOVA Speech short text recognition API
    • PDF

    CLOVA Speech short text recognition API

    • PDF

    Article summary

    The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.

    Available in Classic and VPC

    version

    VersionDateChanges
    v1.0.02023.11.23.Initial draft
    v1.0.12023.12.21.Added the pronunciation check (English) feature

    Requests

    MethodRequest URI
    POSTCalls with InvokeURL of API Gateway created in the CLOVA Speech domain
    Creates a unique call URL for each domain

    API URL

    MethodRequest URI
    POSThttps://clovaspeech-gw.ncloud.com/recog/v1/stt

    Request headers

    Header NameDescription
    X-CLOVASPEECH-API-KEY{Secret Key}
    Content-Typeapplication/octet-stream

    Query Param

    namevaluerequiredvalue
    langstringtrueKor, Eng, Jpn, Chn
    assessmentboolfalseParameter that determines whether to return the pronunciation check result (Eng only)
    utterancestringfalsePronunciation check target text
    graphboolfalseParameter that determines whether to return the voice waveform
    • Assessment is enabled only when English (Eng) is selected.

    Responses

    Response bodies

    Field NameTypeDescription
    textstringResult value of the recognized sound source
    quotaintSound source length (in 15-second units)
    assessment_scoreintPronunciation score of the entire sentence (0-100)
    ref_graphint arrayArray of the voice waveform values of the standard pronunciation (positive integer, 50 samples per second)
    usr_graphint arrayArray of the voice waveform values of the entered pronunciation (positive integer, 50 samples per second)

    Example (cURL shell)

    curl --location 'https://clovaspeech-gw.ncloud.com/recog/v1/stt?lang=Eng&assessment=true&graph=true' \
    --header 'X-CLOVASPEECH-API-KEY: ${secret key}' \
    --header 'Content-Type: application/octet-stream' \
    --data '@/D:/example.mp3'
    
    {
        "text": "sunday morning in an angry creditor",
        "quota": 15, "assessment_score": 14, "assessment_details": "false|{f(f):45, a(ɔː):100, l(l):97, se(s):43} ",
        "ref_graph": [
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 4, 6, 8, 10, 11, 13, 15, 17, 18, 20, 21, 21, 22, 21, 21, 21, 20, 20, 19, 18, 17, 15, 14, 12, 11, 9, 7, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0
        ],
        "usr_graph": [
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 6, 7, 9, 11, 13, 15, 16, 18, 19, 20, 21, 21, 21, 21, 20, 20, 19, 18, 17, 16, 15, 13, 12, 10, 8, 6, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0
        ]
    }
    

    Error codes

    {
        "timestamp": 1700536699045,
        "error": {
            "errorCode": "STT005",
            "message": "Invalid Language"
        }
    }
    

    API errors

    HttpStatusCodeErrorCodeErrorMessageDescription
    400400-Invalid request parameters
    401401Invalid secretInvalid secret
    413STT001Exceed Sound Data lengthVoice data length limit exceeded (60 seconds)
    400STT002Invalid Content Typecontent-type other than application/octet-stream
    400STT003Empty Sound DataNo voice data entered
    400STT005Invalid LanguageEntered data not in the selected language
    400STT004Empty LanguageNo language parameter entered
    500STT006Failed to pre-processingError during voice recognition pre-processing: check if the voice data is in the proper wav, mp3 or flac format
    500STT998Failed to STTError during voice recognition (Contact Customer Support for prompt action)
    500STT999Internal Server ErrorUnknown error (Contact Customer Support for prompt action)

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.