MENU
      CLOVA Speech短文認識 API
        • PDF

        CLOVA Speech短文認識 API

        • PDF

        記事の要約

        Classic/VPC環境で利用できます。

        version

        VersionDateChanges
        v1.0.02023.11.23.最初の作成
        v1.0.12023.12.21.発音評価(英語)機能を追加

        リクエスト

        MethodRequest URI
        POSTCLOVA Speechドメインで作成された API Gatewayの InvokeURLで呼び出す

        API URL

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

        リクエストヘッダ

        ヘッダ名説明
        X-CLOVASPEECH-API-KEY{Secret Key}
        Content-Typeapplication/octet-stream

        Query Param

        namevaluerequiredvalue
        langstringtrueKor, Eng, Jpn, Chn
        assessmentboolfalse発音評価の結果を返すかどうかを決めるパラメータ(Eng only)
        utterancestringfalse発音評価対象のテキスト
        graphboolfalse音声波形を返すかどうかを決めるパラメータ
        • Assementは、英語(Eng)を選択すると動作します。

        レスポンス

        レスポンスボディ

        Field NameTypeDescription
        textstring認識した音源の結果
        quotaint音源の長さ(15秒単位)
        assessment_scoreintセンテンス全体の発音スコア(0~100)
        ref_graphint array基準発音に対する音声波形の値配列(正の整数、1秒当たり50サンプル)
        usr_graphint array入力発音に対する音声波形の値配列(正の整数、1秒当たり50サンプル)

        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'
        Shell
        {
            "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
            ]
        }
        JSON

        エラーコード

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

        APIエラー

        HttpStatusCodeErrorCodeErrorMessageDescription
        400400-Invalid request parameters
        401401Invalid secretInvalid secret
        413STT001Exceed Sound Data length音声データの最大長さを超過(60秒)
        400STT002Invalid Content Typeapplication/octet-stream以外の content-typeの場合に発生
        400STT003Empty Sound Data音声データが入力されていない
        400STT005Invalid Language決められた言語以外の言語が入力される
        400STT004Empty Language音声パラメータが入力されていない
        500STT006Failed to pre-processing音声認識前処理中にエラーが発生 音声データが正常な wav、mp3、flacであるかどうか確認が必要
        500STT998Failed to STT音声認識中にエラー発生(カスタマーサポートまで連絡すると速やかに対応)
        500STT999Internal Server Error不明なエラー発生(カスタマーサポートまで連絡すると速やかに対応)

        この記事は役に立ちましたか?

        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.